Jump to content

Returning To If Not $Error - From @error?


 Share

Recommended Posts

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)

 

 

 

 

Link to comment
Share on other sites

  • Moderators

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

 

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...