Jump to content
Sign in to follow this  
Jango

_IECreate Get Title ?

Recommended Posts

Jango

Hello,

I use _IECreate to open a browser but depending on the OS language or the registry settings, the title can change. Here is the code:

#include <IE.au3>
Opt("TrayIconHide", 1)
Opt("RunErrorsFatal", 0)
Opt("WinTitleMatchMode", -2)

$Title = "Windows Internet Explorer"

$oIE = _IECreate("about:blank", 0, 1)
;If StringInStr($CmdLineRaw, "-a") Then _IEPropertySet($oIE, "addressbar", False)
If StringInStr($CmdLineRaw, "-a") Then ControlHide($Title, "", "[CLASS:ComboBox; INSTANCE:1]")
If StringInStr($CmdLineRaw, "-m") Then _IEPropertySet($oIE, "menubar", False)
If StringInStr($CmdLineRaw, "-t") Then _IEPropertySet($oIE, "toolbar", False)
$Pos = StringInStr($CmdLineRaw, "http")-1
If $Pos > 0 Then
    $Page = StringRight($CmdLineRaw, StringLen($CmdLineRaw)-$Pos)
    _IENavigate($oIE, $Page)
EndIf

Exit(0)

Is it possible to get the title from _IECreate ? or a handle of the ie window ?

Plz help

Share this post


Link to post
Share on other sites
PsaltyDS

Is it possible to get the title from _IECreate ? or a handle of the ie window ?

$hIE = _IEPropertyGet($oIE, "HWND")
$sIETitle = WinGetTitle($hIE)
MsgBox(64, "IE Title", "Title = " & $sIETitle)

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.