Jump to content
Sign in to follow this  
supadodger

Problem With Embedded IE & Variables...

Recommended Posts

supadodger

For $x = 1 To 10
    Dim $oIE[1000]
    Dim $GuiActiveX[1000]
    $oIE[$x] = ObjCreate("Shell.Explorer.2")
    GUICreate("Brandons Browser", 1024, 960, 1, 1)
    $GuiActiveX[$x] = GUICtrlCreateObj($oIE[$x], 1, 1, 1024, 960)
    GuiSetState()
Next


            For $z = 1 To 10
                $oIE[$z].Navigate("http://www.google.com")
            Next
For $z = 1 To 10
_IeLoadWait($oie[$z])
            Next

$oIE[$z].Navigate("http://www.google.com")

$oIE[$z]^ ERROR

am i missing something simple?

Share this post


Link to post
Share on other sites
iamtheky

Dont know that the object return needs to iterate, also couldnt tell what you are quite after, heres a guess.

#include <IE.au3>
#include <Array.au3>


    Dim $GuiActiveX[4]

for $x = 1 to 3
    $oIE = ObjCreate("Shell.Explorer.2")
    GUICreate("Brandons Browser", 1024, 960, 1, 1 )
    Guisetstate ()
    $GuiActiveX[$x] = GUICtrlCreateObj($oIE, 1, 1, 1024, 960)
    $oIE.Navigate("http://www.google.com")

next

_arraydisplay ($GuiActiveX)


while 1
    guisetstate()
    wend
Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites
PsaltyDS

$oIE[$z].Navigate("http://www.google.com")

$oIE[$z]^ ERROR

am i missing something simple?

Just AutoIt syntax. You can't use an array reference directly as an object like that. Try this instead:
#include <IE.au3>

Global $aIE[10]

For $x = 0 To UBound($aIE) - 1
    $aIE[$x] = ObjCreate("Shell.Explorer.2")
    GUICreate("Brandons Browser", 800, 600, $x * 20, $x * 20)
    GUICtrlCreateObj($aIE[$x], 5, 5, 790, 590)
    GUISetState()
Next

For $oIE In $aIE
    $oIE.Navigate("http://www.google.com")
Next

For $oIE In $aIE
    _IELoadWait($oIE)
Next

MsgBox(64, "Done", "Done")

Another way to look at it would be:

For $z = 1 To 10
     $oTemp = $oIE[$z]
     $oTemp.Navigate("http://www.google.com")
Next

:graduated:

Edited by PsaltyDS

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

Share this post


Link to post
Share on other sites
supadodger

#include <ie.au3>
Dim $oIE[1000]
Dim $GuiActiveX[1000]
For $x = 1 To 10
    $oIE[$x] = ObjCreate("Shell.Explorer.2")
    GUICreate("Brandons Browser", 1024, 960, 1, 1)
    $GuiActiveX[$x] = GUICtrlCreateObj($oIE[$x], 1, 1, 1024, 960)
    GUISetState()
Next


For $z = 1 To 10
    $oTemp = $oIE[$z]
    $oTemp.Navigate("http://www.google.com")
Next
For $z = 1 To 10
    _IELoadWait($oIE[$z])
Next

working great

Edited by supadodger

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.