I'm new to autoit and I don't really want to get really good at it. I just had an idea and wanted to make it real.
Let's say I want to farm Li'l Timmy to get his damn white cat. So I thought of downloading autoit and making it press a macro which checked for a target, then press the interact with target macro and then the buy macro. But there are some problems.
I want it to check if I've targeted Timmy before pressing the interact button.
I want it to buy and then wait him to come again later instead of keeping talking to him.
This is my current code, mostly a copypaste:
Code:
HotKeySet("{F5}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
Global $Paused, $Window ='World of Warcraft'
TogglePause()
While 1
If WinExists($Window) Then
ControlSend($Window, "", "", "0", 1)
Sleep(1000)
ControlSend($Window, "", "", "u", 1)
Sleep(1000)
ControlSend($Window, "", "", "0", 1)
Sleep(1000)
Else
MsgBox(0, "WoW Client not found", "Shitshit" &@CRLF& "Epic fail", "", "")
Exit
EndIf
WEnd
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Paused F5 to resume',0,0)
WEnd
ToolTip("")
EndFunc
Func Terminate()
Exit 0
EndFunc
So my macro is "0" and interact with target button is "U".
Any ideas to make it work better?