Sign in to follow this  
Followers 0
BALA

IE Window detection

10 posts in this topic




Look at WMI, there is also table for processes with lots of informations.

You may then search for process with it's executable = iexplorer.exe

Sorry for the ignorance, but what's a WMI?


[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I dont know if you can use the WinGetHandle("Title of the program", "IEFrame"). If you get anything back the window should be a Internet Explorer (well I dont know any other program with IEFrame as class there might be)

Edited by Shevilie

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Is iexplorer.exe Internet Explorer? And what does WinGetHandle do since in the help file example it just seems to get the title of the window.

; Identify the Notepad window that contains the text "this one" and get a handle to it

; Change into the WinTitleMatchMode that supports classnames and handles
AutoItSetOption("WinTitleMatchMode", 4)

; Get the handle of a notepad window that contains "this one"
$handle = WinGetHandle("classname=Notepad", "this one")
If @error Then
    MsgBox(4096, "Error", "Could not find the correct window")
Else
    ; Send some text directly to this window's edit control
    ControlSend($handle, "", "Edit1", "AbCdE")
EndIf
Edited by BALA

[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Search button is out of order? :)

Search results for WMI

No it just said I couldn't search for words with three letters. Don't really know why, it works perfectly now.

Edited by BALA

[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

Share this post


Link to post
Share on other sites

Assuming you know the window handle (hwnd, see WinGetHandle) you can use _IEAttach to test whether it is IE or not -- and do lots more with it if it is...

#include <IE.au3>
$hwnd = WinGetHandle(...)
$oIE  _IEAttach($hwnd, "hwnd")
If Not @error Then ConsoleWrite("$oIE is an IE window..." & @CR)

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Assuming you know the window handle (hwnd, see WinGetHandle) you can use _IEAttach to test whether it is IE or not -- and do lots more with it if it is...

#include <IE.au3>
$hwnd = WinGetHandle(...)
$oIE  _IEAttach($hwnd, "hwnd")
If Not @error Then ConsoleWrite("$oIE is an IE window..." & @CR)

Dale

Would this work on any Internet browser (FireFox) or only Internet Explorer?

[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

Share this post


Link to post
Share on other sites

Would this work on any Internet browser (FireFox) or only Internet Explorer?

Assuming you know the window handle (hwnd, see WinGetHandle) you can use _IEAttach to test whether it is IE or not -- and do lots more with it if it is...


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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