webmedic Posted September 14, 2006 Posted September 14, 2006 Im I to understand this correctly? This allows you to use a flash file as an autoit controle. Could this be used to replace buttons for instance? Hm flash buttons sounds nice.
AzKay Posted September 14, 2006 Author Posted September 14, 2006 I Have no idea. # MY LOVE FOR YOU... IS LIKE A TRUCK- #
Bert Posted September 14, 2006 Posted September 14, 2006 Try this! expandcollapse popup#Include <File.au3> #include <GuiConstants.au3> #include <GuiList.au3> #include <Array.au3> #include <ie.au3> Dim $selection, $Form1 Dim $selection2 GUICreate("Flash Player by Volly", 220, 548, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $FileList = _FileListToArray (@ScriptDir, "*.swf", 1) $atr = _ArrayTrim($FileList, 4, 1, 1) $st = _ArrayToString($atr, "|", 1) $Edit_1 = GUICtrlCreateList("", 20, 30, 170, 450) GUICtrlSetData($Edit_1, $st) $Button_2 = GUICtrlCreateButton("Play Game", 20, 490, 80, 30) $Button_3 = GUICtrlCreateButton("Exit", 110, 490, 80, 30) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_2 $read = GUICtrlRead($Edit_1) $selection = $read & ".swf" GUISetState(@SW_HIDE) _viewer() GUISetState(@SW_SHOW) Case $msg = $Button_3 Exit Case Else ;;; EndSelect WEnd Exit Func _viewer() $W = @DesktopWidth - 220 $H = @DesktopHeight - 150 $Form1 = GUICreate($read, $W, $H, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_SYSMENU, $WS_CAPTION, $WS_POPUPWINDOW, $WS_GROUP, $WS_BORDER, $WS_CLIPSIBLINGS)) $getz = WinGetClientSize($Form1) $get2 = ($getz[0] * .45) $get2b = ($getz[1] * .93) $getL = StringLen($get2) $getLb = StringLen($get2b) $get3 = StringInStr($get2, ".") $get3b = StringInStr($get2b, ".") $lenth = ($getL - $get3) $lenthb = ($getLb - $get3b) $ans = StringTrimRight($get2, $lenth + 1) $ansb = StringTrimRight($get2b, $lenthb + 1) $Obj = _IECreateEmbedded () $browser = GUICtrlCreateObj ($Obj, 8, 8, $W - 20, $H - 70) GUICtrlSetResizing(-1, $GUI_DOCKBORDERS) _IENavigate ($Obj, 'about:blank') $oDoc = _IEDocGetObj ($Obj) $oDoc.body.style.overflow = "auto" $button_4 = GUICtrlCreateButton("End Game", $ans, $ansb, 80, 30) GUISetState(@SW_SHOW) $flash1 = @ScriptDir & "\" & $selection $sHTML = '<embed id=flashy src="' & $flash1 & '" ' $sHTML &= 'quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ' $sHTML &= 'type="application/x-shockwave-flash" ' $sHTML &= 'width="100%" height="100%"></embed>' _IEBodyWriteHTML ($Obj, $sHTML) Sleep(1500) $Obj1 = _IEGetObjByName ($Obj, "flashy") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete($Form1) ExitLoop Case $button_4 GUIDelete($Form1) ExitLoop EndSwitch WEnd EndFunc ;==>_viewer The Vollatran project My blog: http://www.vollysinterestingshit.com/
lod3n Posted September 14, 2006 Posted September 14, 2006 (edited) Volleyman - I like what you've done with Flashy. You should put it in Scripts and Scraps, or add it as a comment to my original Flashy post.webmedic - Yes you definitely can use Flash controls to control AutoIt. Take a look at my conversation with Justin:http://www.autoitscript.com/forum/index.php?showtopic=32605 Edited September 14, 2006 by lod3n [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