Execute command line with TVP Topic is solved
Re: Execute command line with TVP
tokejepsen wrote:Thanks Mike:)
Your code works, but the problem is when you have the quotation marks at the beginning of the string;
Well, I tried to find a way to manage them, but finally it's a limitation of george scripts -_-tokejepsen wrote:More to this. The problem actually seems to be with whitespace before or after the quotation marks.
TVPaint Team
-
- Posts: 19
- Joined: 20 Aug 2015, 12:41
Re: Execute command line with TVP
Then another of working around this problem would be to have the ability to pass arguments to scripts. Is this possible with george script?Well, I tried to find a way to manage them, but finally it's a limitation of george scripts -_-
Re: Execute command line with TVP
Arf, no, it's not possible.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?
And if it was possible, I think there would be the same problem with the double-quotes.
TVPaint Team
Re: Execute command line with TVP
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.
On a Linux-install I tried using the tv_runscript -command. But it only accepts "*.grg" files.
Everything else results in an error.
Re: Execute command line with TVP
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 :
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...
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>"
That listenerscript can be run in the background with crontab or maybe even more fancy, as a service...
-
- Posts: 124
- Joined: 22 Jan 2013, 03:11
Re: Execute command line with TVP
NIce one !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 :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..Code: Select all
tv_WriteTextFile "Append" /tmp/TVPAINT_FIFO "<functionname> <argument>"
That listenerscript can be run in the background with crontab or maybe even more fancy, as a service...
David
--------------------------------------------------------
TVPaint 11.7 Standard
System: 64GB RAM // 3 TB SSD // Core i7 8700K // NVIDIA GTX 1080// Windows 10 Home
--------------------------------------------------------
TVPaint 11.7 Standard
System: 64GB RAM // 3 TB SSD // Core i7 8700K // NVIDIA GTX 1080// Windows 10 Home