Jump to content

_IEFormElementGetObjByName


Recommended Posts

$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 by cookiekiller89
Link to comment
Share on other sites

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 :)

Edited by Neutro
Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...