Jump to content

Recommended Posts

Posted (edited)

hi.

how to make this code run like :

if $SPan is TRUE (found the button) then CLICK on it and refresh the page.., if $SPan is FALSE (Not found the button) then doing something else.

==edited==

in that code if $SPan is TRUE then it will CLICK and Refresh it. but after that it will call 

consolewrite("TOmbol SAM Tidak muncul / EROORRRR"&@CRLF)

how to make the code that could not called it if it TRUE COndition (OBJ $SPan)?

Edited by Tripoz
Posted

Why not, instead of using Not IsObj($Span) use:

while 1
   $Span = _IEGetObjById($oIE, "sell_at_market")
   ;sleep(4000)

   Select
   case IsObj($Span)
      consolewrite("TOmbol SAM muncul"&@CRLF)
      _IEAction($Span, "click")
      sleep(10000)
      _IENavigate($oIE, $url)
      ;_IEAction($Span, "refresh")
   Case @Error
        consolewrite("TOmbol SAM Tidak muncul / EROORRRR"&@CRLF)
        
   EndSelect

WEnd; IsObj($Span)

As the return value on _IEGetObjById for an error is to set @Error flag to a non-zero value.

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Posted (edited)

Did you look at the help file for _IEGetObjByID()? What does it tell you happens if it fails? Perhaps that gives you an idea of what you can do?

 

 

thx so much...

its like @error = 7 right?

Edited by Tripoz

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...