Tripoz Posted July 16, 2015 Share Posted July 16, 2015 (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 August 11, 2015 by Tripoz Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 16, 2015 Moderators Share Posted July 16, 2015 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? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
MikahS Posted July 16, 2015 Share Posted July 16, 2015 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 ~ getENVvarsMy 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 Link to comment Share on other sites More sharing options...
Tripoz Posted July 17, 2015 Author Share Posted July 17, 2015 (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 August 11, 2015 by Tripoz Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 17, 2015 Moderators Share Posted July 17, 2015 What does the help file say? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Tripoz Posted July 17, 2015 Author Share Posted July 17, 2015 What does the help file say?Failure:sets the @error flag to non-zero Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 17, 2015 Moderators Share Posted July 17, 2015 And under that, what does it say for @error = 3, and @error = 7? And does that match up with what you're seeing? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now