Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- F1::
- width := 400
- height := 600
- windows := Windows("TITLE OF THE GAME WINDOW")
- for _,win in windows {
- WinActivate % "ahk_id" win
- WinWaitActive % "ahk_id" win
- WinMove % "ahk_id" win,,,, width, height
- }
- return
- F2::
- ClickGame(100, 200, 100)
- ClickGame(120, 220, 400)
- ClickGame(140, 250, 150)
- return
- Windows(Title := "")
- {
- static ids := ""
- if (!ids) {
- ids := []
- WinGet winList, List, % Title
- loop % winList
- ids.Push(winList%A_Index%)
- }
- return ids
- }
- ClickGame(X, Y, Wait)
- {
- CoordMode Mouse, Window
- for _,win in Windows() {
- WinActivate % "ahk_id" win
- WinWaitActive % "ahk_id" win
- Click % X " " Y
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement