Jump to content

Recommended Posts

Posted

I've been toying with the IE library and do like it. One question:

How can I get the current URL from an IE window ?

_IEGetURL($o_object) doesn't seem to exist :">

Thanks for any hints;

Posted

I've been toying with the IE library and do like it. One question:

How can I get the current URL from an IE window ?

_IEGetURL($o_object) doesn't seem to exist :">

Thanks for any hints;

Maybe iegetproperty: locationurl? I see some things like that in the version of ie.au3 that I downloaded recently...
...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format
Posted

I've been toying with the IE library and do like it. One question:

How can I get the current URL from an IE window ?

_IEGetURL($o_object) doesn't seem to exist ': '>

Thanks for any hints;

Hmm, I look inside the UDF code and observe:

_IECreate - make an instance of your browser object

_IEAttach - attach to an existing browser object

_IENavigate - go to the url

_IEGetProperty - get properties such as address, url, etc (.LocationURL is the one I think you are looking for - use it as $o_object.LocationURL)

_IEQuit - close the browser object

It even has the reference to http://msdn.microsoft.com/library/default....netexplorer.asp inside the code.

Happy reading. ;)

  • 6 years later...
Posted

The function name is "_IEPropertyGet" not "_IEGetProperty". "_IEPropertyGet" can be found in the help file.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

  • 1 month later...
Posted

It exists in the Help file.

; *******************************************************
; Example 1 - Open a browser with the basic example, check to see if the
;   addressbar is visible, if it is turn it off, if it is not turn it on
; *******************************************************
#include <IE.au3>
Local $oIE = _IE_Example("basic")
If _IEPropertyGet($oIE, "addressbar") Then
 MsgBox(0, "AddressBar Status", "AddressBar Visible, turning it off")
 _IEPropertySet($oIE, "addressbar", False)
Else
 MsgBox(0, "AddressBar Status", "AddressBar Invisible, turning it on")
 _IEPropertySet($oIE, "addressbar", True)
EndIf
; *******************************************************
; Example 2 - Open a browser with the form example and get a reference to the form
;   textarea element.  Get the coordinates and dimensions of the text area,
;   outline its shape with the mouse and come to rest in the center
; *******************************************************
$oIE = _IE_Example("form")
Local $oForm = _IEFormGetObjByName($oIE, "ExampleForm")
Local $oTextArea = _IEFormElementGetObjByName($oForm, "textareaExample")
; Get coordinates and dimensions of the textarea
Local $iScreenX = _IEPropertyGet($oTextArea, "screenx")
Local $iScreenY = _IEPropertyGet($oTextArea, "screeny")
Local $iBrowserX = _IEPropertyGet($oTextArea, "browserx")
Local $iBrowserY = _IEPropertyGet($oTextArea, "browserY")
Local $iWidth = _IEPropertyGet($oTextArea, "width")
Local $iHeight = _IEPropertyGet($oTextArea, "height")
; Outline the textarea with the mouse, come to rest in the center
MouseMove($iScreenX, $iScreenY)
MouseMove($iScreenX + $iWidth, $iScreenY)
MouseMove($iScreenX + $iWidth, $iScreenY + $iHeight)
MouseMove($iScreenX, $iScreenY + $iHeight)
MouseMove($iScreenX, $iScreenY)
MouseMove($iScreenX + $iWidth / 2, $iScreenY + $iHeight / 2)

I feel nothing.It feels great.

Posted

Totally aware. I looked for 5 minutes in the help file, didn't see it and searched here for the answer. In no way would I have asked the OP question without a full search of all my resources.

Thanks for the additional links. I'm sure it will help others.

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
  • Recently Browsing   0 members

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