Global variables/mouse clicking

Post here if you need help using Actiona
Post Reply
al33
Posts: 2
Joined: 22 Oct 2012, 16:09

Global variables/mouse clicking

Post by al33 »

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?
User avatar
Jmgr
Admin
Posts: 1651
Joined: 07 Dec 2005, 15:45
Contact:

Re: Global variables/mouse clicking

Post by Jmgr »

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:

Code: Select all

var position = Mouse().position();
"My software never has bugs. It just develops random features."
al33
Posts: 2
Joined: 22 Oct 2012, 16:09

Re: Global variables/mouse clicking

Post by al33 »

Thank you, it worked.
Post Reply