OK, thx. I get the first method. Actually, I was just reading up on includes in MS. I'd have to dig into the second example to see how or where it should be used.
Is there, then, no function shorthand so all the variable names don't need to be typed out each time along the lines of:
functionButton>1,2,3,4,5,6
vs.
Let>firstVariable=1
Let>secondVariable=2
Let>thirdVariable=3
Let>fourthVariable=4
Let>fifthVariable=5
Let>sixthVariable=6
INCLUDE>%SCRIPT_DIR%\Button.scp
Seems like the functionality (no pun intended) may exist be because that's how some of the built in functions work. For instance, when using WaitScreenImage, I just type all the values in separated by commas instead of a long list of let statements with full variable names.
This also brings up a related question. How would I have the function assign a default value for a particular case that is always used UNLESS I have assigned a particular value for the current call (and making sure it doesn't store my value from last time I called it)
So, if I call it the first time WITH imageTolerance defined:
Code: Select all
Let>buttonName=firstButton
Let>imageTolerance=1
INCLUDE>%SCRIPT_DIR%\Button.scp
Then it uses a value of 1 for imageTolerance, but if I call it again WITHOUT defining imageTolerance:
Code: Select all
Let>buttonName=secondButton
INCLUDE>%SCRIPT_DIR%\Button.scp
Then it goes back to using it's predefined value instead since it is not user defined on this call?