Reading developers manual and forum’s examples of scripts I’m still struggling to understand the logic of how interaction between script and UI is provided. Say, I want it to be carried out only by the means of script (without typing-in addresses for parameters in Macro Page Designer). To my understanding I am to create a Parameter via defineParameter function. Let it be like this
defineParameter(mySwitch, nil, 0, 1, 1) (by the way what for Long Name is used?)
Now I can see the newly created parameter in the Parameters List and can read or change its value from the script via getParameter() and setParameter().
After it I create a button on Macro Page. Now how can I relay mySwitch value to the button’s state and vice verse – relaying button’s state to mySwitch? How can it be done with less of drag-n-dropping, but via script only?