02-03-2023, 08:56 PM
I try to create a Macro that moves the mouse to the last clicked position if left Alt + y + NUMBER is pressed.
The Number (from 2 to 7) determines how many times the for is looped. But i dont even get it there.
The Macro simply doesnt recognize the keys as it seems.
Can someone please tell me whats wrong and how to fix it?
That would be great!
Ps.: The next thing i dont know, is how to tab through the amout of windows in the for loop and go to the first window where the VK_LBUTTON is pressed.
For instance:
If i set the number to 3 i got 4 windows. The first one is the one where i do the Alt+y+click, then it should tab through the windows and click on the same spot. After that it should open the first window again. The windows have almost the same name but a little different like: "CHANGINGNAME - Program32"
If one can help me with this, i would be super happy!
Macro Click Mover
The Number (from 2 to 7) determines how many times the for is looped. But i dont even get it there.
The Macro simply doesnt recognize the keys as it seems.
Can someone please tell me whats wrong and how to fix it?
That would be great!
Ps.: The next thing i dont know, is how to tab through the amout of windows in the for loop and go to the first window where the VK_LBUTTON is pressed.
For instance:
If i set the number to 3 i got 4 windows. The first one is the one where i do the Alt+y+click, then it should tab through the windows and click on the same spot. After that it should open the first window again. The windows have almost the same name but a little different like: "CHANGINGNAME - Program32"
If one can help me with this, i would be super happy!
Macro Click Mover
_s.getmacro("" 1)
OnScreenDisplay _s 1
int f
spe 20
opt slowmouse 1
;start
if RealGetKeyState(VK_LMENU) and RealGetKeyState(0x56) and RealGetKeyState(0x32)
,f = 2
,OnScreenDisplay "Zwei Clicks" 1
,out "Zwei Clicks"
if RealGetKeyState(VK_LMENU) and RealGetKeyState(0x56) and RealGetKeyState(0x33)
,f = 3
,OnScreenDisplay "Drei Clicks" 1
,out "Drei Clicks"
if RealGetKeyState(VK_LMENU) and RealGetKeyState(0x56) and RealGetKeyState(0x34)
,f = 4
,OnScreenDisplay "Vier Clicks" 1
,out "Vier Clicks"
if RealGetKeyState(VK_LMENU) and RealGetKeyState(0x56) and RealGetKeyState(0x35)
,f = 5
,OnScreenDisplay "Fünf Clicks" 1
,out "Fünf Clicks"
if RealGetKeyState(VK_LMENU) and RealGetKeyState(0x56) and RealGetKeyState(0x36)
,f = 6
,OnScreenDisplay "Sechs Clicks" 1
,out "Sechs Clicks"
if RealGetKeyState(VK_LMENU) and RealGetKeyState(0x56) and RealGetKeyState(0x37)
,f = 7
,OnScreenDisplay "Sieben Clicks" 1
,out "Sieben Clicks"
if RealGetKeyState(VK_LMENU) and RealGetKeyState(0x56) and RealGetKeyState(VK_LBUTTON)
;Alt + Linksklick
,int mX(xm)
,int mY(ym)
,int i
,for i 0 f
,,ifk(F12) break
,,key AT
,,wait RandomInt(0.1 0.3)
,,mou mX mY
,,lef
else
,goto start