gsb Posted April 2, 2007 Posted April 2, 2007 I am still playing with Flash based controls. Simply an embedded web browser object like: $oIE = ObjCreate("Shell.Explorer.2") $flashyGUI = GUICreate( "Flashy GUI Example", 640, 480,-1, -1, BitOR($WS_SYSMENU, $WS_CAPTION, $WS_SIZEBOX ), $WS_EX_TOPMOST) $GUIActiveX = GUICtrlCreateObj($oIE, 0, 0 , 640 , 480 ) GUICtrlSetResizing(-1,$GUI_DOCKBORDERS) This IE object I then navigate to a temp HTML document written out by the control like: $sFilename = @TempDir&"\loadable.html" $sHTML = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">' & @CRLF $sHTML &= '<HTML><HEAD></HEAD><body>' & @CRLF $sHTML &= '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' & @CRLF $sHTML &= 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0" ' & @CRLF $sHTML &= 'id="gsbMovie" width="100%" height="100%">' & @CRLF $sHTML &= '<param name="movie" value="someMovie.swf">' & @CRLF $sHTML &= '<param name="bgcolor" value="#FFFFFF">' & @CRLF $sHTML &= '</object></body></HTML>' & @CRLF FileDelete($sFilename) FileWrite($sFilename,$sHTML) ... $oIE.Navigate($sFilename) Simple enough and it works fine, but requires two files: the au3 compiled .exe and the 'someMovie.swf' a flash movie. My question: is there a way to 'add' this binary .swf file as a 'resource' of sorts into the compiled au3 .exe? That is, like add it as a compiled script resource and when the script is run, write it to a temp file for use in a similar manner to the HTML file above? Far fetched perhaps but maybe a compiler option I do not yet know about. Thanks for all the help so far with this. gsb "Did you ever stop to think? ...and forget to restart!"
lod3n Posted April 2, 2007 Posted April 2, 2007 FileInstall is the easiest way. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]
gsb Posted April 2, 2007 Author Posted April 2, 2007 Thanks again my friend lod3n. That is what I was looking for in all the wrong places apparently; works perfectly. Keeping you updated, it is a flash control. So the swf can call AutoIt3 functions as in your IE event call example. The control/swf is resizable and can even be popped into a kiosk mode. As well, it can toggle 'tween a "standard control" look and "borderless" as in stripped of all skinning. And now is a single small .exe file. So a flash programmer with some knowledge of AutoIt should be able to make complex flash controls. gsb "Did you ever stop to think? ...and forget to restart!"
lod3n Posted April 2, 2007 Posted April 2, 2007 gsb, it looks like we've created Adobe's Apollo in AutoIt:http://labs.adobe.com/technologies/apollo/I hope they don't sue us! [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]
gsb Posted April 2, 2007 Author Posted April 2, 2007 LOL The other way around I would think lod3n. ...and my daughter is a lawyer too. Hummm... gsb "Did you ever stop to think? ...and forget to restart!"
gsb Posted April 2, 2007 Author Posted April 2, 2007 You folks here have created a great resource and wealth of information in this forum, TY. Now I added rounded corners and dragability to the borderless and titleless Flash GUI. This looks and acts nice now. I am running out of things to add, LOL. Thanks again. gsb "Did you ever stop to think? ...and forget to restart!"
lod3n Posted April 3, 2007 Posted April 3, 2007 Make it do something useful now. Something that flash does well, only have it work with local stuff. Perhaps you could take a look at some of the Example scripts, and see if you slap a shiny new GUI on something someone has already posted. Or, better yet, create a UDF that lets people make their GUIs with flash instead of windows API (as we do it now)... that would be pretty interesting. You could do a heck of a lot with just buttons, labels, images, animations and text boxes. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]
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