I'm having the "Subscript used with non-Array variable" error, I was wondering if you could give instructions on how to fix this problem please? I'm running on a 64-bit operating system
To fix this problem you either need to compile it under 32 bit (not sure if this works) or deactivate AutoIt's native 64bit support.Quote:
I'm having the "Subscript used with non-Array variable" error, I was wondering if you could give instructions on how to fix this problem please? I'm running on a 64-bit operating system
#include <ImageSearch.au3>
MsgBox(0, "Owl Feeding Bot", "Owl Feeding Bot")
WinActivate ( "Mabinogi" )
WinActive ( "Mabinogi" )
While 1
$x1=0
$y1=0
$x2=0
$y2=0
$return = _ImageSearch("return.bmp",1,$x2,$y2,80) ; search for return box
Do
$feeder = _ImageSearch("feed.bmp",1,$x1,$y1,80);Search's for the feed box.
SLeep(200)
if $feeder=1 Then
SLeep(300)
MouseClick("left",$x1,$y1,2)
SLeep(300)
MouseMove(50,50,0)
EndIf
SLeep(5000)
Until $return=1
If $return=1 Then
SLeep(300)
MouseClick("left",$x2,$y2,2)
Sleep(10000)
DoLogOut()
EndIf
WEnd
Func DoLogOut()
$x2=0
$y2=0
$feeder3 = _ImageSearch("menubutton.bmp",1,$x2,$y2,80);Search's for the menubutton box.
SLeep(200)
if $feeder3=1 Then
SLeep(300)
MouseClick("left",$x2,$y2,2)
SLeep(300)
EndIf
SLeep(200)
$feeder4 = _ImageSearch("logout.bmp",1,$x2,$y2,80);Search's for the logout box.
SLeep(200)
if $feeder4=1 Then
SLeep(300)
MouseClick("left",$x2,$y2,2)
SLeep(300)
EndIf
SLeep(200)
$feeder5 = _ImageSearch("okay.bmp",1,$x2,$y2,80);Search's for the okay box.
SLeep(200)
if $feeder5=1 Then
SLeep(300)
MouseClick("left",$x2,$y2,2)
SLeep(300)
EndIf
EndFunc