[Gate-users] Gate equivalent of a "pass" command

Christopher Watanabe chris.r.watanabe at gmail.com
Wed Mar 4 18:01:43 CET 2020


Hello all,

I’m assigning some commands to a Gate macro via bash scripts. In this way,
within my bash script, I can declare a variable called “visCommand” that
will control whether visualization is called by the Gate macro or not:

*within bash script ----------------------------*


if $vis ; then

                visCommand=’/control/execute mac/vis.mac’

else

                visCommand=’/vis/disable’

fi
---------------------------------------------------------



Then just calling {visCommand} in my Gate macro calls the appropriate
command. This works fine for Gate commands that have enabling or disabling,
but I would like to accomplish a similar task. Namely calling for a certain
number of primaries per run if a non-zero argument is given for number of
primaries. However, this is not a matter of disabling anything, so I’m
wondering whether Gate has the equivalent of a “pass” command.

*Within bash script once more ----------------------------------*



If [ $primaries > 0]; then


activityCommand=’/gate/application/setNumberOfPrimariesPerRun
{primariesPerRun}’

else

                activityCommand=*SOME GATE COMMAND THAT TELLS GATE TO DO
NOTHING*

fi



If you don’t understand the bash scripting, that’s okay. In this context, I
just need a Gate command that tells Gate to disregard this line in the
macro. I’ve tried to just insert a comment, but GATE throws an error
because it can’t find the command. I’m not sure whether this would be a
bash nuance though – perhaps something such as
activityCommand=’#/this_is_a_gate_comment’ is somehow illegal.



In any case, I appreciate any help! And if you’re curious about calling
Gate from bash scripts, let me know in an email!

Best,

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20200304/f20956a7/attachment.html>


More information about the Gate-users mailing list