Jump to content

Error from _IEPropertyGet()


JohnOne
 Share

Recommended Posts

Am I using this function wrong ?

The return indicates a success, but I get a warning error (without stopping script)

$V = _IEPropertyGet($GUIActiveX,"busy")
            Switch $V
                Case @error = 0
                    ConsoleWrite("No Error" & $V & @CRLF)
                Case @error = 3
                    ConsoleWrite("Invalid Data Type" & @CRLF)
                Case @error = 4
                    ConsoleWrite("Invalid Object Type" & @CRLF)
                Case @error = 5
                    ConsoleWrite("Invalid Value" & @CRLF)
            EndSwitch

and heres the error

>"F:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "F:\NEWGUI\Test.au3" /autoit3dir "F:\Program Files\AutoIt3" /UserParams

+>23:26:11 Starting AutoIt3Wrapper v.2.0.0.3 Environment(Language:0409 Keyboard:00000809 OS:WIN_VISTA/ CPU:X86 OS:X86)

>Running AU3Check (1.54.19.0) from:F:\Program Files\AutoIt3

+>23:26:12 AU3Check ended.rc:0

>Running:(3.3.4.0):F:\Program Files\AutoIt3\autoit3.exe "F:\NEWGUI\Test.au3"

--> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidDataType

No Error0

+>23:31:38 AutoIT3.exe ended.rc:0

+>23:31:39 AutoIt3Wrapper Finished

>Exit code: 0 Time: 328.555

The object is a flash object on a webpage that appears to be fully loaded

and is the only thing in the gui (no webpage)

Any ideas where Im going wrong ?

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Post the output from this:

ConsoleWrite("OBJ = " & ObjName($GUIActiveX) & @LF)

Your error checking is invalid because the Switch/Case usage is wrong, as $v is being compared to the result of another compare operation. In the first case for example, you have this effective check:

If $v = (@error = 0) Then

:mellow:

Edit: Oops, forgot "$" on variable name.

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

Hey PsaltyDS

Thanks for reply.

F:\NEWGUI\test.au3(146,44) : ERROR: syntax error

ConsoleWrite("OBJ = " & ObjName(GUIActiveX)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

F:\NEWGUI\test.au3 - 1 error(s), 0 warning(s)

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

At the risk of getting ran out of town by an angry e-posse.

Apart from using this GUI for my grandaughter to play games without having a browser open, I am also trying to figure out how to get info from and interact with flash, and gingerly taking my first steps.

#include <IE.au3>
#include <GUIConstants.au3>
$oIE = ObjCreate("Shell.Explorer.2")
$hGui = GUICreate("GUI",620,450)
$GUIActiveX = GUICtrlCreateObj($oIE,10,10,600,400)
$button = GUICtrlCreateButton("Property",285,420,50,20)
GUISetState()
$oIE.Navigate2("http://www.onlineflashgames.org/files/module/games/swfs/a583f8a2595827ac453048b1e4c96abf_1267193598.swf")
while 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $button
            $V = _IEPropertyGet($GUIActiveX,"busy")
            ConsoleWrite($V)
    EndSelect
WEnd

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Oh, you want $oIE, not $GUIActiveX for your _IE* functions. Try:

$V = _IEPropertyGet($oIE,"busy")

Look at the example script in the help file under _IECreateEmbedded().

:mellow:

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

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