tommytx Posted May 17, 2013 Share Posted May 17, 2013 (edited) I am well familiar with determing what window oIE is running.. but how to tell if its up and running..PERIOD.. so if its running.. I can navigate and if not I can create...$title = "Boom"Local $oIE = _IEAttach($title)if WinExists ($title) ThenMsgBox(0, "The URL", _IEPropertyGet($oIE, "locationurl"))I have tried such dumb stuff as:If $oIE then navigate....If NOT $oIE then create IE and then navigate.if WinExists("") then etcIn other words the title may be anything or nothing..What can i ask the oIE for like a property that will tell me its running without causing it to abort and quit... The code above shows I know how to tell if its runnig when I know the title..Thanks Edited May 17, 2013 by tommytx Link to comment Share on other sites More sharing options...
jdelaney Posted May 17, 2013 Share Posted May 17, 2013 (edited) you can look do winlist("[CLASS:IEFrame]") That will return an array of handles, which you can throw into _IEAttach($hwnd, "HWND") Edited May 17, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
tommytx Posted May 17, 2013 Author Share Posted May 17, 2013 Can you expound on that a little for us slow ones... LOL..Something like: $array = winlist("[CLASS:IEFrame]")Then study the array of handles and try to determine which handle applys to my instance of IE then place that handle into the variable $hwnd.How bad did I buther that one.. boy I really know how to make something simple hard.. but anyway if you could break it down for me I would greatly appreciate it._IEAttach($hwnd, "HWND") Link to comment Share on other sites More sharing options...
Fredinchy Posted May 17, 2013 Share Posted May 17, 2013 $array = WinList("[CLASS:IEFrame]") will return a list of the IE windows that exist. For example if there is only one instance of IE then $array[ 0 ][ 0 ] will be 1, and $array[ 1 ][ 1 ] is going to be the handle of that IE window. Now that you have the handle just _IEAttach( $array[ 1 ][ 1 ],"HWND" ) to attach to the instance. Cause no one here can ever stop us, they can try but we won't let them.. No way Link to comment Share on other sites More sharing options...
water Posted May 17, 2013 Share Posted May 17, 2013 Or use WinExist("iexplore.exe") to test if IE is running. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
DaleHohm Posted May 17, 2013 Share Posted May 17, 2013 (edited) _IEAttach includes an "instance" mode. Example 5 for _IEAttach in the helpfile shows you how to loop through the existing IE windows and create an array of object references with them. You could also examine title or url or any other attribute as you loop through them. Dale Edited May 17, 2013 by DaleHohm 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 Link to comment Share on other sites More sharing options...
tommytx Posted May 27, 2013 Author Share Posted May 27, 2013 Thanks... all those suggestions were helpful... Link to comment Share on other sites More sharing options...
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