The Bytecode Club

Full Version: Need help with autoit script for game
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It's been months since I visited this forum and hopefully this section is still active. I know it isn't much but I promise to paypal $5 to the first person that can get this script to work for me the way that I want it to. I know a promise isn't much on the internet these days but you have my word.

I been trying all night but can't seem to get it to work. I want it automate background click 4-5 times in various spots on the program while the program is in the background and not always on top.

I can't seem to get the script to send a background click on a button. I used the autoit window spy to get the name of the title and try to tell it to click the spot in the "in active window".

example of what the game looks like
https://i.imgur.com/K96QwRg.jpg


Script below:





F5::
Macro1:
Loop
{
If WinExists("Andy") Then
ControlClick("Andy", "", "", "left","257","359")
Sleep(1000)
ControlClick("Andy", "", "", "left","400","290")
Sleep(100000)
ControlClick("Andy", "", "", "left","400","290")
Sleep(1000)
ControlClick("Andy", "", "", "left","371","315")
Sleep(1000)
EndIf
Sleep(2900)
}
Return

F8::ExitApp
Moved the post to the correct subforum.
People will find your post easier here.