Hi there
So I have been using HIDmacros for a while and it has been great, it has been a steep learning curve but mostly i have made it do what i want it to do.
I am trying something a bit more advanced now
I have a program that i want to make a macro that opens a menu, moves the mouse to a position, clicks that button, moves mouse to another position and clicks again then closes the menu
the sequence i wrote is this:
HIDMacros.SendKeysSlow "{F11}" ,2000
HIDMacros.Sleep 1000
HIDMacros.MouseClick 784, 208, 0
HIDMacros.Sleep 1000
HIDMacros.MouseClick 784, 208, 1
HIDMacros.Sleep 2000
HIDMacros.MouseClick 763, 328, 0
HIDMacros.Sleep 1000
HIDMacros.MouseClick 763, 328, 1
HIDMacros.Sleep 1000
HIDMacros.SendKeysSlow "{F11}",2000
The big problem seems to be it runs all of the lines in the command at once
if i use the following having opened the menu then it will press the first button on first activation and then the second button on second activation:
HIDMacros.MouseClick 784, 208, 0
HIDMacros.MouseClick 784, 208, 1
HIDMacros.MouseClick 763, 328, 0
HIDMacros.MouseClick 763, 328, 1
when i add the F11 command it will open the menu but not press any buttons and when i addd 'HIDMacros.Sleep 1000' it seems to slow the program down and delay the programs operation not just the key presses
so my question is this.....Am i writing these commands correctly or how do i write a script better to make the following happen:
- press F11 to open menu
- Wait 2 seconds
- move mouse cursor to X-784, Y-208 and click
- Wait one second
- Move mouse cursor to X-763, Y-328 and click
- Wait half a second
- press F11 to close the menu
or as an alternate option is there a way to set up multiple macros to run one after the other, so one macro completes and that triggers the next in a sequence, if so does anyone have any information on how that works?
macro one
- press F11 to open menu
- Wait 2 seconds
- Trigger macro 2
Macro 2
- move mouse cursor to X-784, Y-208 and click
- Wait one second
-Trigger macro 3
Macro 3
- Move mouse cursor to X-763, Y-328 and click
- Wait half a second
-Trigger macro 4
Macro 4
- press F11 to close menu
Thanking you in advance for your help it is pretty frustrating issue as i am pretty sure i have the commands right but i need to slow them down so they happen one after the other not all at once.
delay in mouse movement and click
Re: delay in mouse movement and click
Hey Scat!
Did you figure out how to put sleep/delay/ some time between actions?
Did you figure out how to put sleep/delay/ some time between actions?