Sign in to follow this  
Followers 0
alienkillaz

subscript used with non-array variable

3 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0