Raystar
27th March 2009, 05:21 PM
Hello everybody.
I'm trying to assign one of my MFP keys (the MFP is the only device associated to the profile and I'm using the #16 button --> JS1.B16) a macro to perform the following steps:
- record the actual position of the mouse pointer
- click the left mouse button
- while keeping the mouse button move the mouse pointer to a specified location (let's use x=200, y=400 as an example)
- release the left mouse button
- move the mouse pointer back to the previously recorded position
Until now I put together the following:
script
if (JS1.B16) then
A1 = SCREENX; //save x coordinate
A2 = SCREENY; //save y coordinate
CMS.B2 = TRUE, //activate the left mouse mouse button
SCREENX = 200; //move mouse pointer
SCREENY = 400; //move mouse pointer
CMS.B2 = FALSE; //release the mouse left button
SCREENX = A1; //move mouse pointer back to saved position
SCREENY = A2; //move mouse pointer back to saved position
endif
endscript
As you can imagine by the fact that I'm asking for help, the script doesn't do what I think it should do. I'm sure I'm missing something about the way I should program it, any help you guys/gals could give me?
Thanks in advance,
Francesco
I'm trying to assign one of my MFP keys (the MFP is the only device associated to the profile and I'm using the #16 button --> JS1.B16) a macro to perform the following steps:
- record the actual position of the mouse pointer
- click the left mouse button
- while keeping the mouse button move the mouse pointer to a specified location (let's use x=200, y=400 as an example)
- release the left mouse button
- move the mouse pointer back to the previously recorded position
Until now I put together the following:
script
if (JS1.B16) then
A1 = SCREENX; //save x coordinate
A2 = SCREENY; //save y coordinate
CMS.B2 = TRUE, //activate the left mouse mouse button
SCREENX = 200; //move mouse pointer
SCREENY = 400; //move mouse pointer
CMS.B2 = FALSE; //release the mouse left button
SCREENX = A1; //move mouse pointer back to saved position
SCREENY = A2; //move mouse pointer back to saved position
endif
endscript
As you can imagine by the fact that I'm asking for help, the script doesn't do what I think it should do. I'm sure I'm missing something about the way I should program it, any help you guys/gals could give me?
Thanks in advance,
Francesco