BALA Posted January 28, 2007 Posted January 28, 2007 Is it possible to tell whether a window is an IE window or not? [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
Zedna Posted January 28, 2007 Posted January 28, 2007 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 Resources UDF ResourcesEx UDF AutoIt Forum Search
BALA Posted January 28, 2007 Author Posted January 28, 2007 Look at WMI, there is also table for processes with lots of informations.You may then search for process with it's executable = iexplorer.exeSorry 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
Shevilie Posted January 28, 2007 Posted January 28, 2007 (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 January 28, 2007 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
Zedna Posted January 28, 2007 Posted January 28, 2007 Sorry for the ignorance, but what's a WMI?Search button is out of order? Search results for WMI Resources UDF ResourcesEx UDF AutoIt Forum Search
BALA Posted January 28, 2007 Author Posted January 28, 2007 (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 January 28, 2007 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
BALA Posted January 28, 2007 Author Posted January 28, 2007 (edited) Search button is out of order? Search results for WMINo it just said I couldn't search for words with three letters. Don't really know why, it works perfectly now. Edited January 28, 2007 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
DaleHohm Posted January 28, 2007 Posted January 28, 2007 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
BALA Posted January 28, 2007 Author Posted January 28, 2007 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
Moderators SmOke_N Posted January 28, 2007 Moderators Posted January 28, 2007 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... 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now