Hscript command line

   1670   0   1
User Avatar
Member
100 posts
Joined: Sept. 2006
Offline
Hello,
Bit lost with passing args to Hscript.
Im using Redshift as a render engine, and it requires a command to be set if you want to pick a given gpu unit to render.
The following command enables the last unit, out of 4, to render a given task:
Redshift_setGPU -s 0001

VERSION 1:
command_line:> H16.bat

H16.bat code is as follows:
hscript H16.cmd
H16.cmd code:
mread my_file.hip
Redshift_setGPU -s 0001
render -V my_ROP
quit
That works a treat ! not as handy, but works.

VERSION 2:
command_line:> H16.bat 0001

H16.bat code is as follows:
hscript H16.cmd %1
H16.cmd code:
mread my_file.hip
Redshift_setGPU -s $arg1
render -V my_ROP
quit
no luck ..
Im trying also to pass an argument like this:
command_line:> H16.bat 0001

H16.bat code:
hscript H16.cmd 'run("Redshift_setGPU -s %1")'
H16.cmd code:
mread my_file.hip
$arg1
render -V my_ROP
quit
no luck still..
When I add the following lines to the last 2 versions of the H16.cmd file:
echo the argument count is: $argc
echo the argument passed is: $arg1

Both times it logs:
the argument count is: 1
the argument passed is:

Any lights on the matter would be much obliged as always!
Cheers!
A
Edited by axelsp - May 31, 2017 16:01:33
  • Quick Links