Need help with a simple script Topic is solved

Ask gaming related questions (AHK v1.1 and older)
Amidas

Need help with a simple script  Topic is solved

16 Feb 2018, 05:51

Hello all, I've come in touch with Autohotkey a little while ago, but I am a newbie when it comes to programming. I've been able to do simple things such as autoclicking, but now I am trying to do this in a window that is running on the background. Hopefully this will allow me to do other things on my PC while the script still does it's job in the window.

After browsing the internet for several days I've created a code, the issue being...It doesn't work. I've tried adjusting it in many ways but nothing seems to do the trick. It appears to do...nothing at all. If I run the code without all the window stuff, it works flawlessly. I replace the programid with the program name + id, which I got with the AU3_spy program. I hope that someone will be able to help me with this, if possible with explanation so I know how and why it works the way it does.

Thank you in advance.

This is the code I've created:

Code: Select all

$F6::
WinGet, programid,List, Program name
Loop
{
ControlSend,,{m}, ahk_id %programid%
Sleep 1000
ControlClick, x968 y547, ahk_id %programid%
Sleep 2000
ControlSend,,{m}, ahk_id %programid%
Sleep 1000
ControlClick, x968 y547, ahk_id %programid%
Sleep 2000
ControlClick, x968 y547, ahk_id %programid%
Sleep 2000
ControlClick, x1293 y744, ahk_id %programid%
Sleep 1000
ControlClick, x968 y547, ahk_id %programid%
Sleep 1500
ControlClick, x968 y547, ahk_id %programid%
Sleep 1500
ControlClick, x588 y743, ahk_id %programid%
Sleep 1500
ControlClick, x968 y547, ahk_id %programid%
Sleep 1500
ControlClick, x968 y547, ahk_id %programid%
Sleep 1500
ControlClick, x570 y744, ahk_id %programid%
Sleep 1500
ControlClick, x968 y547, ahk_id %programid%
Sleep 1500
ControlClick, x968 y547, ahk_id %programid%
Sleep 1500
}
$F2::pause

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 45 guests