Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SendText(hwnd, text) {
- Loop, Parse, text
- {
- ControlSend,, %A_LoopField%, ahk_id %hwnd%
- Sleep, 50
- }
- }
- #Persistent
- SetTitleMatchMode, 2
- DetectHiddenWindows, On
- SetTimer, SendCommands, 300000
- SendCommands:
- WinGet, idList, List, Warcraft III
- total := idList
- if (total = 0) {
- MsgBox, Warcraft III windows not found
- Return
- }
- commands := ["-quest", "-greed", "-str"]
- Loop, %total%
- {
- hwnd := idList%A_Index%
- for index, cmd in commands
- {
- ControlSend,, {Enter}, ahk_id %hwnd%
- Sleep, 200
- SendText(hwnd, cmd)
- Sleep, 200
- ControlSend,, {Enter}, ahk_id %hwnd%
- Sleep, 300
- }
- if (A_Index < total) {
- Sleep, 10000
- }
- }
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement