TripScott Posted December 6, 2010 Share Posted December 6, 2010 Hello all,I am surprised at the lack of information I find on IE tabs. I am using IE 8. I need to write a script that will find a specific web page on a tab if it is open. With the work I do, I could have 5 or more IE sessions open, each of which can have many open tabs. The web page I need may or may not be open. I need to be able to find it if it is open, otherwise open it.The site is a search page for my company, so the page I need to find could be the search page or the results page. If the search page isn't found I don't want it to create a new search page because it is possible that the results page is open. Just press "back" & you are at the search page. How can I write a script to do this?I have this that works if the search page is open. $oIE = _IECreate("http://lynengr.myco.com/pdmqry/pdmqry.html", 1,1,0,1) do Send("^{TAB}") until WinActive("Get Items from PDM Vault","")This works great if the search page is open on a tab. But if the results page is open, a new instance of the search page is open. What I need is a way to:search for the results pageif found, send({back})if not found search for "http://lynengr.myco.com/pdmqry/pdmqry.html"if found, activateif not found IEcreateThanks for any help or direction you can give me. Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 6, 2010 Share Posted December 6, 2010 Each tab is like a separate instance of IE. Use _IEAttach() and note the difference between "Title" and "WindowTitle" in the help file. 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 Link to comment Share on other sites More sharing options...
TripScott Posted December 6, 2010 Author Share Posted December 6, 2010 What is the difference between "Title" and "WindowTitle"? Title = (Default) sub-string of main document title WindowTitle = sub-string of full window title (instead of document title) This doesn't explain a lot. I assume the WindowTitle comes from the <title> code of the web page. Where do you find the document title? Thanks, Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 6, 2010 Share Posted December 6, 2010 No, you got that backwards. The <title> element is inside the document, and so that would be the document title used with "Title". The window title would be used "WindowTitle", and has a string added to it from the registry. So the document title might be "AutoIt Forums", while the window title would be "AutoIt Forums - Internet Explorer". 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 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