Hi,
I have updated my Autoit3 script for automation. Now it will set the script to diable the confirmation button by itself.
It also includes a setup feature to get the position and color that you need to change to make it work in your resolution.
Just start it and press F7 to get the position and color that you then can alter the script with. F8 is to start the automation, it will send the script to WoW and start the petbattle.
IT uses alt-tab, so make sure you can just alt-tab between your clients. And have the non-levelling client up when you press F8.
F9 is to quit.
FB is the Find Button values for the non-levelling account Find Button.
AB is the Accept button values for the levelling client.
FP is the values for the lvl 25 pet that needs to be selected on the levelling account.
FF is the Forfeit flag values for the non-levelling account.
Code:
HotKeySet("{F7}", "getpos")
HotKeySet("{F9}", "ExitProg")
HotKeySet("{F8}", "StartStop")
#Find button X, Y, Color
$FB_X=707
$FB_Y=729
$FB_C=6751236
#Accept button X, Y, Color
$AB_X=750
$AB_Y=330
$AB_C=5964033
#First Pet X, Y, Color
$FP_X=656
$FP_Y=768
$FP_C=10844490
#Forfeit flag X, Y, Color
$FF_X=882
$FF_Y=870
$FF_C=3223848
Func getpos()
Local $pos = MouseGetPos()
MsgBox(0, "Setup", "x is: " & $pos[0] & ", y is: " & $pos[1])
Local $col = PixelGetColor($pos[0], $pos[1])
MsgBox(0, "Setup", "color is: " & $col)
EndFunc
Func ExitProg()
Exit 0;;Exits the program
EndFunc
$On = False
While 1
While $On = True
$var = 1
sleep(500)
While $var <> $FB_C
sleep(500)
$var = PixelGetColor($FB_X, $FB_Y)
WEnd
MouseClick("left",$FB_X, $FB_Y,1)
sleep(500)
Send("{ALTDOWN}{TAB}{ALTUP}")
sleep(5000)
MouseClick("left",$FB_X, $FB_Y,1)
sleep(500)
While $var <> $AB_C
sleep(1000)
$var = PixelGetColor($AB_X, $AB_Y)
WEnd
MouseClick("left",$AB_X, $AB_Y,1)
sleep(500)
Send("{ALTDOWN}{TAB}{ALTUP}")
sleep(1000)
MouseClick("left",$AB_X, $AB_Y,1)
sleep(500)
Send("{ALTDOWN}{TAB}{ALTUP}")
sleep(2000)
While $var <> $FP_C
sleep(1000)
$var = PixelGetColor($FP_X, $FP_Y)
WEnd
MouseClick("left",$FP_X, $FP_Y,1)
sleep(300)
Send("{ALTDOWN}{TAB}{ALTUP}")
sleep(300)
While $var <> $FF_C
sleep(500)
$var = PixelGetColor($FF_X,$FF_Y)
WEnd
MouseClick("left",$FF_X,$FF_Y,1)
sleep(7000)
WEnd
Sleep(100)
WEnd
Func StartStop()
If $On = False Then
MsgBox(0, "Start", "Welcome, if nothing happens, run setup by pressing F7 and change the values in the script.")
MsgBox(0, "Start", "First Im going to run a little script in your window.")
send ("{Enter}")
send("/run PetBattleFrame.BottomFrame.ForfeitButton:SetScript(""OnClick"", function() C_PetBattles.ForfeitGame() end)")
send ("{Enter}")
$On = True
Else
$On = False
EndIf
EndFunc