Hello,
i want to let a macro run, the time the cusor is within a speciefied area of a window.
Im sorrybut have no clue to solve this.
I know i can get the data of the cursor true GetCusrosPos, but then i have to activate my macro the time its within that "window"
if X>365
if X70
if Y<430
goto data
This is what i thought, its within that window area and then it jumps to the label
I hope somebody get the idea what i mean, and could help me with that ?
Best
cursor area active
Moderators: Dorian (MJT support), JRL
You would need to alter the script but there are a couple of Ideas discussed here that might help you. These execute on a mouse click within a certain screen region. You would need to alter this so that the macro executes when the mouse cursor moves into the specified screen region.
So heres partially the code which i use :
---------------------------------------------------------------------
// Set Bounds Here
Let>X1=365
Let>X2=780
Let>Y1=70
Let>Y2=430
Let>OnlyDesktop=1
OnEvent>KEY_DOWN,VK2,0,MouseClick
Label>MainLoop
Wait>0.2
Goto>MainLoop
SRT>MouseClick
GetActiveWindow>title,xact,yact
Let>OkToContinue=FALSE
If>OnlyDesktop=1
If>title=TmsSw
Let>OkToContinue=TRUE
Endif
Else
Let>OkToContinue=TRUE
Endif
If>OkToContinue=TRUE
// Check Cursor is Within Bounds
GetCursorPos>X,Y
If>{((%X% >= %X1%) AND (%X% = %Y1%) AND (%Y% rawexport
Endif
Endif
END>MouseClick
-----------------------------------------------------------------------
Hope somebody can use it also
---------------------------------------------------------------------
// Set Bounds Here
Let>X1=365
Let>X2=780
Let>Y1=70
Let>Y2=430
Let>OnlyDesktop=1
OnEvent>KEY_DOWN,VK2,0,MouseClick
Label>MainLoop
Wait>0.2
Goto>MainLoop
SRT>MouseClick
GetActiveWindow>title,xact,yact
Let>OkToContinue=FALSE
If>OnlyDesktop=1
If>title=TmsSw
Let>OkToContinue=TRUE
Endif
Else
Let>OkToContinue=TRUE
Endif
If>OkToContinue=TRUE
// Check Cursor is Within Bounds
GetCursorPos>X,Y
If>{((%X% >= %X1%) AND (%X% = %Y1%) AND (%Y% rawexport
Endif
Endif
END>MouseClick
-----------------------------------------------------------------------
Hope somebody can use it also