Gui Posted December 2, 2009 Posted December 2, 2009 Is it possible to monitor if the URL changes? I tried _IEPropertyGet($oIE,'LocationUrl') , but it doesn't seem to work. In the code, it navigates to a URL when the start button is clicked. Then, it needs to show a MSGBox, and then wait for the user to log in. <I used a Do Until statement.. [ Do .. Until _IEPropertyGet($oIE,'LocationUrl') = The current URL....] After that, I tried using and If Then statement, to see if the PropertyGet is different, but it didn't work.. I'm gonna show the code, becuase you guys are probably confused.. Func start() _IENavigate($oIE,'** The URL **') Do MsgBox(0,'',"Now would be a good time to log in, don't you think..") Until _IEPropertyGet($oIE,'locationurl') = '** The login URL above **' If _IEPropertyGet($oIE,'locationurl') = '** The URL after a user log's in.. **' _IENavigate($oIE,'** a next URL **') EndIf EndFunc I doubt it's the write functions to be using, I just wanted to find other opinions. Thanks guys Please post your suggestions.
jvanegmond Posted December 2, 2009 Posted December 2, 2009 For this problem, I follow a simple tactic: MsgBox(0, "", "Please login on the webpage, then press OK on this message.") If you want to check if it worked, see if the specific elements you are expecting to see are available on the page; If not, go back. Also; try lowercase. "locationurl" github.com/jvanegmond
99ojo Posted December 2, 2009 Posted December 2, 2009 (edited) Hi, confusing code. I think that $starturl is the login site. After successfull login, the user is redirect to another site. This may help you. Just change the url to which site you want to, after www.google.com is loaded and see what's going on. start () Func start() Local $starturl = "www.google.com" $oIE = _IECreate () _IENavigate($oIE,$starturl) MsgBox(0,'',"Now would be a good time to log in, don't you think..") $orgurl = _IEPropertyGet($oIE,'locationurl') Do ToolTip ("Please login.....") sleep (1000) Until _IEPropertyGet($oIE,'locationurl') <> $orgurl Tooltip ("") EndFunc ;-)) Stefan Edited December 2, 2009 by 99ojo
Gui Posted December 2, 2009 Author Posted December 2, 2009 (edited) Thanks both of you . 99ojo, it maay be little confusing ;P . Thanks guys. Edited December 2, 2009 by Gui
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