Jump to content
Sign in to follow this  
cyanidemonkey

Flash comunication with autoIt exe?

Recommended Posts

cyanidemonkey

Hi, is it possible for a .swf file that has been embedded into a autoit GUI using the $oSWF = ObjCreate("ShockwaveFlash.ShockwaveFlash") etc method to pass varibles to the autoIt wrapper?

not sure where to look, GetURL, fscommand, or maybe ExternalInterface.call?


My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator

Share this post


Link to post
Share on other sites
Authenticity

Hmm... passing what? the object properties? collections?

If you can store a references, strings, etc.. on a variable then the wrapper can reference them. For example, AutoIt doesn't know what an Excel Sheet may contain unless it's stored into variable, or I'm completely misunderstanding the subject.

Edited by Authenticity

Share this post


Link to post
Share on other sites
cyanidemonkey

Hmm... passing what? the object properties? collections?

If you can store a references, strings, etc.. on a variable then the wrapper can reference them. For example, AutoIt doesn't know what an Excel Sheet may contain unless it's stored into variable, or I'm completely misunderstanding the subject.

oh sorry just strings


My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator

Share this post


Link to post
Share on other sites
Authenticity

Show how you can extract string resources using this object you'll understand alone what to do. Otherwise, you need to get yourself the Flash SDK and code everything in HLL:

Opt('GuiOnEventMode', 1)

Dim $oSW = ObjCreate('ShockwaveFlash.ShockwaveFlash.1')
ObjEvent($oSW, 'Shockwave_')
Dim $hGUI = GUICreate('Test', 500, 400)
Dim $Shockwave = GUICtrlCreateObj($oSW, 0, 0, 500, 300)
GUICtrlCreateButton('Go To Frame', 215, 340, 70, 25)
GUICtrlSetOnEvent(-1, '_GoToFrame')
GUISetOnEvent(-3, '_EXIT')

GUISetState()

With $oSW
    .LoadMovie(0, @ScriptDir & '\upload.swf')
    .Play
EndWith
    
While 1
    Sleep(100)
WEnd


Func _EXIT()
    GUIDelete()
    Exit
EndFunc

Func _GoToFrame()
    $oSW.GotoFrame(45)
    $oSW.Play
EndFunc

Func Shockwave_FlashCall($sRequest)
    ConsoleWrite('Request: ' & $sRequest & @LF)
EndFunc

Func Shockwave_onprogress($iPercentDone)
    ConsoleWrite('Percentage loaded: ' & $iPercentDone & @LF)
EndFunc


Func Shockwave_onreadystatechange($iNewState)
    ConsoleWrite('Ready state: ' & $iNewState & @LF)
EndFunc

Share this post


Link to post
Share on other sites
cyanidemonkey

thx 4 the replys. found the thread about Flex/AutoIt comunication here: http://www.autoitscript.com/forum/index.ph...mp;#entry565053

has all the info I need, pretty qwick to convert the Flex to Flash.

It works ok, I'm getting the COM error window come up all the time, but the flash is sending the varables to AutoIt ok. Have just done a Qwick&Dirty to test it, will look at it again in more detail tomorrow.

thx.

Edited by cyanidemonkey

My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator

Share this post


Link to post
Share on other sites
cyanidemonkey

my COM errors were due to the fact I forgot to call this function in flash

function init():void{

ExternalInterface.addCallback( "AI3Call", AI3Call );

ExternalInterface.addCallback( "AI3CallReturn", AI3CallReturn );

}

had it in there, just didn't call it - doh!

Do the users need to have flash plugin installed for IE to use the ActiveX and ObjCreate("ShockwaveFlash.ShockwaveFlash") etc?

Is there a way to package the ActiveX/flash player with the AutoIt exe like a flash projector (flash.exe)? So that it is stand alone?

Could the AutoIt wrapper fail if the flash player is not on there system (or flash player is old).

Edited by cyanidemonkey

My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator

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.