Code: Select all
SRT>ifElement
Let>elementName=ifElement_var_1
Let>windowName=ifElement_var_2
UIPos>windowName,elementName,elementPOS
END>ifElement
GoSub>ifElement,elementName,windowName
IF>elementPos<>{""}
DO SOMETHING
ENDIF
It occurs to me that it may be simpler to call by organizing the same function in such a way that I don't have to remember or look up the variable whose value I'm checking each time, but can rather just call the function by name, tell it what I want to do, and then supply then ENDIF... while the IF portion is within the function like so:
Code: Select all
SRT>ifElement
Let>elementName=ifElement_var_1
Let>windowName=ifElement_var_2
UIPos>windowName,elementName,elementPOS
IF>elementPos<>{""}
END>ifElement
GoSub>ifElement,elementName,windowName
DO SOMETHING
ENDIF
Is this fine, and just basically like using any other IfWindowOpen or similar, or am I causing a potential problem down the line when things get more complex?