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
mread my_file.hip Redshift_setGPU -s 0001 render -V my_ROP quit
VERSION 2:
command_line:> H16.bat 0001
H16.bat code is as follows:
hscript H16.cmd %1
mread my_file.hip
Redshift_setGPU -s $arg1
render -V my_ROP
quit
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")'
mread my_file.hip
$arg1
render -V my_ROP
quit
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