Jump to content

Need help with IE functions..


Gui
 Share

Recommended Posts

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)

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

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