Input for George Script

A forum dedicated to George scripting questions
Post Reply
brianottosen
Posts: 10
Joined: 20 Dec 2012, 13:30

Input for George Script

Post by brianottosen »

Hi all

Does anybody know if it is possible to give parameters in a command line when I call a George Script.

In pseudo code something like:

C:\>tvpaint.exe myscript.grg -s 1920 1080

Brian.
User avatar
Eric Scholl
Posts: 1303
Joined: 04 Apr 2011, 14:40

Re: Input for George Script

Post by Eric Scholl »

Hi brianottosen,

I don't think it's possible for now, but do you need to do this only for changing the size of the export or is it for a more general case ?
We could have an alternate solution to do that only for the export size.
brianottosen
Posts: 10
Joined: 20 Dec 2012, 13:30

Re: Input for George Script

Post by brianottosen »

Whan I mean is how you normally set variables when executing scripts in more general terms. In fact I only used the -s 1920 1080 as an example because it's easy to understand.

I would like execute one command line like this:
"%ProgramFiles(x86)%\TVPaint Developpement\TVPaint Animation 10 Pro (32bits)\TVPaint Animation 10 Pro (32bits).exe" "script=X:\george\globals.grg" 12 7 monkey

Currently we are doing doing it by performing three steps:

1. Create X:\jobs\job.bat
2. Create X:\jobs\job.grg
3. Execute X:\jobs\job.bat

It works but adds more complexity to the submitter.

I was wondering if there is a better way.


X:\jobs\job.bat
--- file beginning ---
"%ProgramFiles(x86)%\TVPaint Developpement\TVPaint Animation 10 Pro (32bits)\TVPaint Animation 10 Pro (32bits).exe" "script=X:\jobs\job.grg"
--- file end ---



X:\jobs\job.grg:
--- file beginning ---
foo = 12
bar = 7
type = "monkey"

doThis ()
doThat ()

EXIT

INCLUDE X:\george\globals.grg
INCLUDE X:\george\functions.grg
--- file end ---
User avatar
Hervé
Site Admin
Posts: 3490
Joined: 08 Feb 2006, 17:00
Location: Metz France
Contact:

Re: Input for George Script

Post by Hervé »

brianottosen wrote:Hi all
Does anybody know if it is possible to give parameters in a command line when I call a George Script.
In pseudo code something like:
C:\>tvpaint.exe myscript.grg -s 1920 1080
Brian.

It's possible, you can set value to the current config with the cmd tv_writeusertring

ex: tvpaint.exe "cmd=tv_writeuserstring mysection myline myvalue" script=myscript.grg

In the script file use tv_readuserstring to get the value you want.
Hervé ADAM, TVPaint Team
Post Reply