Jump to content
Sign in to follow this  
Xand3r

[Solved]ObjCreate error

Recommended Posts

Xand3r

Try this... run if from scite, close it and then run it from windows(double click it) or compile and run it...

GUICreate(":TEST:")
Global $oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.10")
$GUIActiveX    = GUICtrlCreateObj( $oRP, 0, 0 , 50 , 50)
With $oRP
    .bgcolor = "#000000"
    .Movie = @ScriptDir&'\asdf.swf';
    .ScaleMode = 2
    .Loop = False
    .wmode = "transparent"
    .FlashVars = ""
    .allowScriptAccess="Always"
EndWith
GUISetState()
While GUIGetMsg()<>-3
    Sleep(10)
WEnd
$oRP=""

edit: the error code when running it compiled is -2147221164 "Class not registered" :P(

Edited by TheMadman

Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro

Share this post


Link to post
Share on other sites
BrettF

I used this script, and no errors when I run it compiled or straight from SciTE.

$oMyError = ObjEvent("AutoIt.Error","MyErrFunc")

GUICreate("TEST")
Global $oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.1")
$GUIActiveX = GUICtrlCreateObj($oRP, 0, 0, 800, 600)
GUISetState ()

With $oRP
    .bgcolor = "#000000"
    .Movie = @MyDocumentsDir & "\testaa.swf";
    .ScaleMode = 2
    .Loop = False
    .wmode = "transparent"
    .FlashVars = ""
    .allowScriptAccess = "Always"
EndWith


While GUIGetMsg() <> -3
    Sleep(10)
WEnd
$oRP = ""

Func MyErrFunc()

    MsgBox(0, "AutoItCOM Test", "We intercepted a COM Error !" & @CRLF & @CRLF & _
            "err.description is: " & @TAB & $oMyError.description & @CRLF & _
            "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _
            "err.number is: " & @TAB & Hex($oMyError.number, 8) & @CRLF & _
            "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _
            "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _
            "err.source is: " & @TAB & $oMyError.source & @CRLF & _
            "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _
            "err.helpcontext is: " & @TAB & $oMyError.helpcontext _
            )

    Local $err = $oMyError.number
    If $err = 0 Then $err = -1

    $g_eventerror = $err; to check for after this function returns
EndFunc  ;==>MyErrFunc

Using AutoIt V3.3.0.0. I have Macromedia Studio 8 installed too...

How does this one go for you?

Share this post


Link to post
Share on other sites
Xand3r

same thing... when running it from scite it works fine.. but when i run it by double clicking the au3

edit: autoit v3.3.0.0

os:vista ultimate

flash player 10 installed

post-19203-1236516341_thumb.jpg

Edited by TheMadman

Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro

Share this post


Link to post
Share on other sites
Xand3r

I found the error... when running or compiling for x64 it didn't work

but when i compiled for x86 it worked fine :P


Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro

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.