Jump to content

Recommended Posts

Posted (edited)

im getting the very weird error saying that im using a non-array variable. Can someone run this and tekk me if they get same error..

(its an msn away-message program)

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")



$b = @DesktopWidth * .9375
$a = @DesktopHeight * .93
$d = @DesktopHeight

Do

$coord = PixelSearch( 40, $a, $b, $d, 0xE87F0D)
pixelSearch( 40, $a, $b, $d, 0xE87F0D)
sleep(200)
if not @error Then
    sleep(100)
    MouseClick("left", $coord[0] & "," & $coord[1], 1, 30)
    sleep(500)
    send("Away Message: I am away from the keyboard and this is my away message robot")
    send("{enter}")
    sleep(500)
    EndIf
until 1 = 2



Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc
Edited by alienkillaz
Posted

im getting the very weird error saying that im using a non-array variable.  Can someone run this and tekk me if they get same error..

$coord = PixelSearch( 40, $a, $b, $d, 0xE87F0D)

pixelSearch( 40, $a, $b, $d, 0xE87F0D)

sleep(200)

The Sleep on the line following the PixelSearch is resetting @error to 0, causing the If statement to be true when it should be false. You also have an extra PixelSearch you forgot to remove.

Phillip

Posted

The Sleep on the line following the PixelSearch is resetting @error to 0, causing the If statement to be true when it should be false.  You also have an extra PixelSearch you forgot to remove.

<{POST_SNAPBACK}>

worked, thank you

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...