Reptos

Returning To If Not $Error - From @error?

5 posts in this topic

Hello again! I'm trying to figure out how i return to the If not @error Part of this script if it doesn't find the pixel. Basically the script searches for a pixel and if it finds it it clicks it then its the loop. If it doesn't it refreshes the page and then ( BLAH ) ? ??? I need it to refresh the page and then re-try the first part of the script again. 

Here is my attempt Script : 

While 1
   WinActivate("ourWorld")
     Sleep(4000)
     $cords = PixelSearch(845, 222,1000, 292,0xF0D826) ; mp
   If Not (@error) Then
    MouseClick("Left",$cords[0],$cords[1],1,1)
      ExitLoop
      EndIf
      If (@error) Then
         MouseClick("Left",77, 43)
 ; refresh button 
         Sleep(950)
          MouseClick("Left",692, 238) ; return to menu  
          Loop If Not (@error)

 

 

 

 

Share this post


Link to post
Share on other sites



ourworld.com is a flash game... is this what that's for?

Share this post


Link to post
Share on other sites

ourworld.com is a flash game... is this what that's for?

Yes making a simple program for it 

Share this post


Link to post
Share on other sites

Yes making a simple program for it 

You should take a look at the forum rules then.

Share this post


Link to post
Share on other sites

Reptos,

kaisies is quite right - please read the Forum rules - particularly the bit about not discussing game automation - before you post again.  Thread locked.

M23

 


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.