|
need help troubleshooting code
code is kinda wacky this is an mtgo trading bot in the works hoping someone can shed some light not sure my code is perfectly right so far i know the bottom function the mouse click does not work properly the one outside the loop
#include "misc.au3"
;Wait for trade
While 1 = 1
if _ispressed("0d") then exitloop; press the ENTER key to exit the loop
$coord1 = PixelSearch( 538, 463, 626, 479, 0xE7E7E7 )
If Not @error Then
MouseClick("left", $coord1[0], $coord1[1], 1)
EndIf
;dock window
$FindDock = PixelSearch(766, 41, 781, 49, 0xFEFEFE )
If Not @error Then
MouseClick("left", $FindDock[0], $FindDock[1], 1)
Else
$FindDock2 = PixelSearch(784, 212, 797, 221, 0xFEFEFE )
If Not @error Then
MouseClick("left", $FindDock2[0], $FindDock2[1], 1)
EndIf
EndIf
$FindDock3 = PixelSearch(803, 386, 817, 394, 0xFEFEFE )
If Not @error Then
MouseClick("left", $FindDock3[0], $FindDock3[1], 1)
Else
$FindDock4 = PixelSearch(819, 559, 834, 567, 0xFEFEFE )
If Not @error Then
MouseClick("left", $FindDock4[0], $FindDock4[1], 1)
EndIf
EndIf
WEnd
sleep(2000)
MouseClick("left", 1139, 585, 1, 0)
Send("Welcome to a bot in testing 123!!!")
Send("{ENTER}")
|