Sign in to follow this  
Followers 0
SweatyOgre

I keep getting this damned error

8 posts in this topic

I can't figure it out for the life of me, especially since its a section of script Larry helped me with.

Here's the error:

Posted Image

Here's the code:

$XY = PixelSearch(314, 192, 507, 389, 0x7898D8)
    Sleep(3500)
  MouseClick("left",$XY[0],$XY[1], 1, 0)

Share this post


Link to post
Share on other sites



:D You can copy the text of most message boxes to the clipboard by pressing Ctrl+C

The result looks like the following:

---------------------------
Sample
---------------------------
Example message
---------------------------
OK   
---------------------------

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

It gave me the error when i used @error, so I took it out, and it is giving me the same error, so I figured that wasn't the problem.

Share this post


Link to post
Share on other sites

nobody knows what it is?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

did you try Larry's code ?

The issue is that if the Pixelsearch fails, it doesn't return an Array and thus gives this error if you try to access it in that way.

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I originally used Larry's code, and got the exact same error with it.

Share this post


Link to post
Share on other sites

I originally used Larry's code, and got the exact same error with it.

just being persistent here: ....

Larry's code look good...: you didn't change itat all and it give an error telling you that it isn't an Array ??

Sure you didn't put another statement between these lines:

$XY = PixelSearch(314, 192, 507, 389, 0x7898D8)
If Not @ERROR Then

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

:D  You can copy the text of most message boxes to the clipboard by pressing Ctrl+C

The result looks like the following:

---------------------------
Sample
---------------------------
Example message
---------------------------
OK   
---------------------------
:iamstupid: I can not get that to work in Windows 95 and 98. I do not know about other OS's.

David Nuttall
Nuttall Computer Consulting

An Aquarius born during the Age of Aquarius

AutoIt allows me to re-invent the wheel so much faster.

I'm off to write a wizard, a wonderful wizard of odd...

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