Hi there , thank you so much for this tool it helped me a lot
i have this small question
How to Freeze Random Cordinates for Y Axis and not for X Axis
so i have this Icon on my Desktop and its recognized by the mage search and moves the mouse button to the middle of it
using the Variables in the mouse Setting
%FoundX% and %FoundY% then
Check Random Coordinates CheckBox and set pixels but it works for Both X and Y
and i wanted to freeze the Y Axis and make the X Axis move randomly in a straight line
Thank you guys i really appreciate the whole Thing
[Mod action: Moved topic to v1 section because the syntax described is v1 syntax.]
How to Freeze Random Cordinates for X Axis
Re: How to Freeze Random Cordinates for X Axis
Simply capture the current mouse position and use the current mouse pos for moving the mouse:
Code: Select all
F1::
; image search code here saving positions to imgX and imgY
; ...
; this would move the mouse only on the X axis to the position where the image X location was found
; but keep the Y position of where the mouse was located at that point in time
MouseGetPos, MouseX, MouseY
MouseMove, %imgX%, %MouseY%
return
Projects:
AHK-ToolKit
AHK-ToolKit
-
- Posts: 2
- Joined: 19 Sep 2017, 06:49
Re: How to Freeze Random Cordinates for X Axis
actually it works but it leaves the Image and go above it by maybe 100 Pixels
besides i can't fine MouseMove in Commands just to do it Exactly as you mentioned
Re: How to Freeze Random Cordinates for X Axis
You can correct for that by adding to/subtracting from the variable like this:friedeggs911 wrote: ↑07 Jun 2023, 02:13image.png
Thank you so much for replying
actually it works but it leaves the Image and go above it by maybe 100 Pixels
Code: Select all
MouseGetPos, MouseX, MouseY
MouseY -= 100 ; subtract 100 pixels ➡ moves the mouse up by 100
; or MouseY += 100 ; add 100 pixels ➡ moves the mouse down
MouseMove, %imgX%, %MouseY%
I didnt know pulover's macro creator had a function finder hehefriedeggs911 wrote: ↑07 Jun 2023, 02:13besides i can't fine MouseMove in Commands just to do it Exactly as you mentioned
image.png
but it seems like he hasnt updated the command list in a very long while or the search function is not returning the correct values.
I usually go to the documentations Alphabetical Command and Function Index when i want to know if a command is available or not.
Projects:
AHK-ToolKit
AHK-ToolKit