AlmarM Posted November 5, 2008 Share Posted November 5, 2008 Hi,This time I made this 2 UDF's. _GUICtrlCreateFlashObj _GUICtrlCreateInternetObjI'm not sure if this is already made?I know it's simple. But you need to start somewhere Example + UDF'sexpandcollapse popupExample1() Func Example1() $GUI = GUICreate("Example 1", 620, 220, -1, -1) _GUICtrlCreateFlashObj(10, 10, 600, 200, "http://www.play4traffic.com/game.swf") GUISetState() While 1 $nMsg = GUIGetMsg() Select Case $nMsg = -3 GUIDelete($GUI) Example2() EndSelect WEnd EndFunc Func Example2() $GUI = GUICreate("Example 2", 500, 500, -1, -1) _GUICtrlCreateInternetObj(10, 10, 480, 450) $Input = GUICtrlCreateInput("http://", 10, 470, 150, 20) $Button = GUICtrlCreateButton("Navigate!", 170, 470, 100, 20) GUISetState() While 1 $nMsg = GUIGetMsg() Select Case $nMsg = -3 Exit Case $nMsg = $Button $Read = GUICtrlRead($Input) $oShell.Navigate($Read) EndSelect WEnd EndFunc Func _GUICtrlCreateFlashObj($cLeft, $cTop, $cHeight, $cWidth, $iMovie) Global $oGame $oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") GUICtrlCreateObj($oGame, $cLeft, $cTop, $cHeight, $cWidth) With $oGame .Movie = $iMovie .ScaleMode = 2 .wmode = "Opaque" .Loop = True .bgcolor = "#000000" EndWith EndFunc Func _GUICtrlCreateInternetObj($cLeft, $cTop, $cHeight, $cWidth) Global $oShell $oShell = ObjCreate("Shell.Explorer.1") GUICtrlCreateObj($oShell, $cLeft, $cTop, $cHeight, $cWidth) EndFuncAlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
spudw2k Posted November 5, 2008 Share Posted November 5, 2008 Prety neat. Has been done before but this is very simple and easy. I would recommend not using Global inside of a Function. Use Local instead. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
AlmarM Posted November 5, 2008 Author Share Posted November 5, 2008 Prety neat. Has been done before but this is very simple and easy. I would recommend not using Global inside of a Function. Use Local instead.Ha! Listen.If I use 'Local' I cant use things like '.Navigate' or for the Flash '.SetVariable'.AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
spudw2k Posted November 5, 2008 Share Posted November 5, 2008 (edited) Ha! Listen. If I use 'Local' I cant use things like '.Navigate' or for the Flash '.SetVariable'. AlmarMHa. I guess I don't understand? expandcollapse popupExample1() Func Example1() $GUI = GUICreate("Example 1", 620, 220, -1, -1, 0x00C40000) _GUICtrlCreateFlashObj(10, 10, 600, 200, "http://www.play4traffic.com/game.swf") GUISetState() While 1 $nMsg = GUIGetMsg() Select Case $nMsg = -3 GUIDelete($GUI) Exit EndSelect WEnd EndFunc Func _GUICtrlCreateFlashObj($cLeft, $cTop, $cHeight, $cWidth, $iMovie) Local $oGame $oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") GUICtrlCreateObj($oGame, $cLeft, $cTop, $cHeight, $cWidth) With $oGame .Movie = $iMovie .ScaleMode = 2 .wmode = "Opaque" .Loop = True .bgcolor = "#000000" EndWith EndFuncoÝ÷ Ùçb´èH±çÁ«'ßÛe¢"¶y°k¢Ìû§pí«jDz¢ç(ºWljeÊ·º¹íêç-jëh×6Example1() Func Example1() $GUI = GUICreate("Example 1", 620, 220, -1, -1) $oGame = _GUICtrlCreateFlashObj(10, 10, 600, 200, "http://www.play4traffic.com/game.swf") GUISetState() While 1 $nMsg = GUIGetMsg() Select Case $nMsg = -3 GUIDelete($GUI) Example2() EndSelect WEnd EndFunc Func Example2() $GUI = GUICreate("Example 2", 500, 500, -1, -1) $oShell = _GUICtrlCreateInternetObj(10, 10, 480, 450) $Input = GUICtrlCreateInput("http://", 10, 470, 150, 20) $Button = GUICtrlCreateButton("Navigate!", 170, 470, 100, 20) GUISetState() While 1 $nMsg = GUIGetMsg() Select Case $nMsg = -3 Exit Case $nMsg = $Button $Read = GUICtrlRead($Input) $oShell.Navigate($Read) EndSelect WEnd EndFunc Func _GUICtrlCreateFlashObj($cLeft, $cTop, $cHeight, $cWidth, $iMovie) Local $oGame $oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") GUICtrlCreateObj($oGame, $cLeft, $cTop, $cHeight, $cWidth) With $oGame .Movie = $iMovie .ScaleMode = 2 .wmode = "Opaque" .Loop = True .bgcolor = "#000000" EndWith Return $oGame EndFunc Func _GUICtrlCreateInternetObj($cLeft, $cTop, $cHeight, $cWidth) Local $oShell $oShell = ObjCreate("Shell.Explorer.1") GUICtrlCreateObj($oShell, $cLeft, $cTop, $cHeight, $cWidth) Return $oShell EndFunc Edited November 5, 2008 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
AlmarM Posted November 6, 2008 Author Share Posted November 6, 2008 Ha. I guess I don't understand? expandcollapse popupExample1() Func Example1() $GUI = GUICreate("Example 1", 620, 220, -1, -1, 0x00C40000) _GUICtrlCreateFlashObj(10, 10, 600, 200, "http://www.play4traffic.com/game.swf") GUISetState() While 1 $nMsg = GUIGetMsg() Select Case $nMsg = -3 GUIDelete($GUI) Exit EndSelect WEnd EndFunc Func _GUICtrlCreateFlashObj($cLeft, $cTop, $cHeight, $cWidth, $iMovie) Local $oGame $oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") GUICtrlCreateObj($oGame, $cLeft, $cTop, $cHeight, $cWidth) With $oGame .Movie = $iMovie .ScaleMode = 2 .wmode = "Opaque" .Loop = True .bgcolor = "#000000" EndWith EndFuncoÝ÷ Ùçb´èH±çÁ«'ßÛe¢"¶y°k¢Ìû§pí«jDz¢ç(ºWljeÊ·º¹íêç-jëh×6Example1() Func Example1() $GUI = GUICreate("Example 1", 620, 220, -1, -1) $oGame = _GUICtrlCreateFlashObj(10, 10, 600, 200, "http://www.play4traffic.com/game.swf") GUISetState() While 1 $nMsg = GUIGetMsg() Select Case $nMsg = -3 GUIDelete($GUI) Example2() EndSelect WEnd EndFunc Func Example2() $GUI = GUICreate("Example 2", 500, 500, -1, -1) $oShell = _GUICtrlCreateInternetObj(10, 10, 480, 450) $Input = GUICtrlCreateInput("http://", 10, 470, 150, 20) $Button = GUICtrlCreateButton("Navigate!", 170, 470, 100, 20) GUISetState() While 1 $nMsg = GUIGetMsg() Select Case $nMsg = -3 Exit Case $nMsg = $Button $Read = GUICtrlRead($Input) $oShell.Navigate($Read) EndSelect WEnd EndFunc Func _GUICtrlCreateFlashObj($cLeft, $cTop, $cHeight, $cWidth, $iMovie) Local $oGame $oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") GUICtrlCreateObj($oGame, $cLeft, $cTop, $cHeight, $cWidth) With $oGame .Movie = $iMovie .ScaleMode = 2 .wmode = "Opaque" .Loop = True .bgcolor = "#000000" EndWith Return $oGame EndFunc Func _GUICtrlCreateInternetObj($cLeft, $cTop, $cHeight, $cWidth) Local $oShell $oShell = ObjCreate("Shell.Explorer.1") GUICtrlCreateObj($oShell, $cLeft, $cTop, $cHeight, $cWidth) Return $oShell EndFunc Arg! Ofcourse! AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. 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