How would i create some global variables to work with in both code pieces and normal actions. For example, setting the variables using:
var mouse = new Mouse();
x = mouse.position().x;
y = mouse.position().y;
And after clicking this position not through code, but through normal actions. How can i do it?
Global variables/mouse clicking
Re: Global variables/mouse clicking
All variables are automatically global.
To use the value of a variable to click at a position, set the position field to code mode using the red triangle and write the name of the variable containing the position.
To do that you will have to store the position a one Point variable, not two numbers:
To use the value of a variable to click at a position, set the position field to code mode using the red triangle and write the name of the variable containing the position.
To do that you will have to store the position a one Point variable, not two numbers:
Code: Select all
var position = Mouse().position();
"My software never has bugs. It just develops random features."
Re: Global variables/mouse clicking
Thank you, it worked.