Jump to content

Problem With Embedded IE & Variables...


Recommended Posts

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?

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

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

#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
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...