mcbaker01
USA
Asked
— Edited
In the quick reference, I see that CC accepts two or more arguments.
I've looked through the documentation and the example scripts and I don't see info on using extra parameters with CC.
Parameter 0 - window name Parameter 1 - command Parameter 2 - ? Parameter 3 - ?
Am I missing something?
Only some controls accept multiple parameters. The EZ-Script manual for the ControlCommand displays a few examples - here is a cut and paste from the EZ-Script manual:
The additional parameters for controls that support them are not fully documented at this time. There are some changes being done to the documentation to reflect a pile of updates - including alphabetically sorting the examples. That will be updated in a few releases forward
Okay cool.
If I create my own procedure though, how do I pass parameters to it?
Didn't see that in the manual.
Also, how does scoping of variables work?
Variables are global
I should also add that the ControlCommand parameters are hardcoded within the application. You do not pass variables to an EZ-Script. Instead, the variable scope is global - so you use a variable to specify the parameters, then ScriptStart the control.
There are plenty examples within the Examples button within ARC.
Another question about ControlCommand.
Can I pass a label location as an agrument?
i.e. CC("DoingSomething",scriptstart,turnleft)
where the script to run looks something like:
#DoingSomething script :turnleft servo(d13,75) return
:turnright servo(d13,25) return
No, you can do the commands that are outlined in the Cheat Sheet tab when editing scripts.
Press Cheat Sheet tab and you can view all available control commands for all controls currently in your project
DJ THAT script he made looks good to add to EZB ,can it be done and others like too.