Sign in to follow this  
Followers 0
Gui

Need help with IE functions..

5 posts in this topic

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

Share this post


Link to post
Share on other sites



Anyone..? Bump.

Share this post


Link to post
Share on other sites

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"

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by 99ojo

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Thanks both of you :). 99ojo, it maay be little confusing ;P . Thanks guys.

Edited by Gui

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0