cookiekiller89 Posted May 11, 2013 Posted May 11, 2013 (edited) $oIE = _IECreate("<a href='http://www.autoitscript.com/wiki/Main_Page' class='bbc_url' title=''>http://www.autoitscript.com/wiki/Main_Page"</a>) Sleep(1000) Local $oInputs = _IETagNameGetCollection($oIE, "input") For $oInput In $oInputs If $oInput.value == "Go" Then _IEAction($oInput, "click") Exitloop EndIf Next In the above example is it possible to attain the input without $oIE, so without _IECreate? can the object variable be empty as long as the page exists will it still attain that information then continue with the next actions? IF the user already has the page open, i dont want another page created to get the input, so is there another _IE func or way where _IETagNameGetCollection just recognizes if the page is open and retrieves the input and goes on as normal ? Edited May 11, 2013 by cookiekiller89
Neutro Posted May 11, 2013 Posted May 11, 2013 (edited) Hello cookiekiller Is this what you are trying to do? ; ******************************************************* ; Example 3 - Attempt to attach to an existing browser displaying a particular website URL ; Create a new browser and navigate to that site if one does not already exist ; ******************************************************* #include <IE.au3> $oIE = _IECreate("http://www.autoitscript.com/wiki/Main_Page", 1) ; Check @extended return value to see if attach was successful If @extended Then MsgBox(0, "", "Attached to Existing Browser") Else MsgBox(0, "", "Created New Browser") EndIfThis is in the help file of _IECreate function Edited May 11, 2013 by Neutro Identify active network connections and change DNS server - Easily export Windows network settings Clean temporary files from Windows users profiles directories - List Active Directory Groups members Export content of an Outlook mailbox to a PST file - File patch manager - IRC chat connect example Thanks again for your help Water!
mikell Posted May 11, 2013 Posted May 11, 2013 You can also play with the visibility #include <IE.au3> $oIE = _IECreate("http://www.autoitscript.com/wiki/Main_Page", 1, 0) Local $oInputs = _IETagNameGetCollection($oIE, "input") For $oInput In $oInputs If $oInput.value == "Go" Then _IEAction($oInput, "click") Exitloop EndIf Next $oIE.visible = 1
cookiekiller89 Posted May 11, 2013 Author Posted May 11, 2013 (edited) thanks guys, i overlooked that, I'll have a play and get back to yous update: worked swell. thanku Edited May 11, 2013 by cookiekiller89
cookiekiller89 Posted May 12, 2013 Author Posted May 12, 2013 Hello cookiekiller Is this what you are trying to do? ; ******************************************************* ; Example 3 - Attempt to attach to an existing browser displaying a particular website URL ; Create a new browser and navigate to that site if one does not already exist ; ******************************************************* #include <IE.au3> $oIE = _IECreate("http://www.autoitscript.com/wiki/Main_Page", 1) ; Check @extended return value to see if attach was successful If @extended Then MsgBox(0, "", "Attached to Existing Browser") Else MsgBox(0, "", "Created New Browser") EndIf This is in the help file of _IECreate function Hi again, i have another question regarding EXAMPLE 2 of _IECreate ; ******************************************************* ; Example 2 - Create new browser windows pointing to each of 3 different URLs ; if one does not already exist ($f_tryAttach = 1) ; do not wait for the page loads to complete ($f_wait = 0) ; ******************************************************* #include <IE.au3> _IECreate("www.autoitscript.com", 1, 1, 0) _IECreate("my.yahoo.com", 1, 1, 0) _IECreate("www.google.com", 1, 1, 0) As it explained above with my script there is no auto log in, so the user will start by logging in, then their homepage will appear where they will start the script. when i goto the site myself and i log in, sometimes i get 2 different addresses not that different but noticeable on the homepage... one ends in /home.html?jli=1 and the other just in /home.html, i can change the number at the end to = 2 = 3 and it will still load. im just wondering if this will still register... as in say i use the /home.html with example 3 and try to attach to that window if it's not already created, will that link register if it's ended with home.html?jli=1, i mean technically it's still the same page and everything is displayed the same... now in example 2 where you give it 3 different URL's do I declare all the URL's in the same variable? say i have URL 1 already loaded up which is the autoitscript in the example so it attaches to that. now i dont have yahoo and google up at all so does the script load those 2 pages even if it finds the autoit, is the goal to load 3 pages or search for ONE of those pages ? as like a loop and if so do i declare it in a variable as i would like to have it search for home.html?jli=1 and just the normal 1 and if it finds one then just not load the other
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