cyanidemonkey Posted April 2, 2009 Share Posted April 2, 2009 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 Link to comment Share on other sites More sharing options...
Authenticity Posted April 2, 2009 Share Posted April 2, 2009 (edited) 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 April 2, 2009 by Authenticity Link to comment Share on other sites More sharing options...
cyanidemonkey Posted April 2, 2009 Author Share Posted April 2, 2009 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 Link to comment Share on other sites More sharing options...
Authenticity Posted April 2, 2009 Share Posted April 2, 2009 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: expandcollapse popupOpt('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 Link to comment Share on other sites More sharing options...
cyanidemonkey Posted April 2, 2009 Author Share Posted April 2, 2009 (edited) thx 4 the replys. found the thread about Flex/AutoIt comunication here: http://www.autoitscript.com/forum/index.ph...mp;#entry565053has 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 April 2, 2009 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 Link to comment Share on other sites More sharing options...
cyanidemonkey Posted April 2, 2009 Author Share Posted April 2, 2009 (edited) 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 April 2, 2009 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now