Execute command line with TVP Topic is solved

A forum dedicated to George scripting questions
User avatar
Fabrice
Posts: 10077
Joined: 17 Jul 2007, 15:00
Contact:

Re: Execute command line with TVP

Post by Fabrice »

Mike will be back on monday
Fabrice Debarge
User avatar
Mike
Posts: 1050
Joined: 16 Feb 2006, 08:58

Re: Execute command line with TVP

Post by Mike »

tokejepsen wrote:Thanks Mike:)
Your code works, but the problem is when you have the quotation marks at the beginning of the string;
tokejepsen wrote:More to this. The problem actually seems to be with whitespace before or after the quotation marks.
Well, I tried to find a way to manage them, but finally it's a limitation of george scripts -_-
TVPaint Team
tokejepsen
Posts: 19
Joined: 20 Aug 2015, 12:41

Re: Execute command line with TVP

Post by tokejepsen »

Well, I tried to find a way to manage them, but finally it's a limitation of george scripts -_-
Then another of working around this problem would be to have the ability to pass arguments to scripts. Is this possible with george script?
User avatar
Mike
Posts: 1050
Joined: 16 Feb 2006, 08:58

Re: Execute command line with TVP

Post by Mike »

tokejepsen wrote:Then another of working around this problem would be to have the ability to pass arguments to scripts. Is this possible with george script?
Arf, no, it's not possible.
And if it was possible, I think there would be the same problem with the double-quotes.
TVPaint Team
User avatar
kaspar128
Posts: 20
Joined: 12 Feb 2013, 15:18
Location: Amsterdam

Re: Execute command line with TVP

Post by kaspar128 »

Would it also be possible, with this method, to run a shell-script on Linux system?

On a Linux-install I tried using the tv_runscript -command. But it only accepts "*.grg" files.
Everything else results in an error.
User avatar
kaspar128
Posts: 20
Joined: 12 Feb 2013, 15:18
Location: Amsterdam

Re: Execute command line with TVP

Post by kaspar128 »

I found a way!
In Linux, (on windows possibly too), one can create a FIFO, a named pipe that can act as a file(but is just a buffer ). With george it is possible to write text to it :

Code: Select all

tv_WriteTextFile "Append" /tmp/TVPAINT_FIFO "<functionname> <argument>"
Now one only needs a pythonscript running that listens to the '/tmp/TVPAINT_FIFO' and interpretes the text that is sent to it, as a command to execute a function with its argument..
That listenerscript can be run in the background with crontab or maybe even more fancy, as a service...
spyderheart
Posts: 124
Joined: 22 Jan 2013, 03:11

Re: Execute command line with TVP

Post by spyderheart »

kaspar128 wrote: 15 Jun 2018, 09:21 I found a way!
In Linux, (on windows possibly too), one can create a FIFO, a named pipe that can act as a file(but is just a buffer ). With george it is possible to write text to it :

Code: Select all

tv_WriteTextFile "Append" /tmp/TVPAINT_FIFO "<functionname> <argument>"
Now one only needs a pythonscript running that listens to the '/tmp/TVPAINT_FIFO' and interpretes the text that is sent to it, as a command to execute a function with its argument..
That listenerscript can be run in the background with crontab or maybe even more fancy, as a service...
NIce one !
David
--------------------------------------------------------
TVPaint 11.7 Standard
System: 64GB RAM // 3 TB SSD // Core i7 8700K // NVIDIA GTX 1080// Windows 10 Home
Post Reply