Jump to content

grahamwh

Members
  • Posts

    6
  • Joined

  • Last visited

About grahamwh

  • Birthday 04/28/1983

Profile Information

  • Location
    UK

grahamwh's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thanks alot for your help its working now >_
  2. Ok so what i am trying to do is when the message box appears it has two buttons (ok and cancel) all i want it to do is if you click ok it plays the song if not it just goes bk to doing nothing. Thing is im stuck with what to do after the msgbox() code i dont know what to add after this part ive been reading through the help file and just cant get my head aroound it. Tried lots of different ways and failed so hopefully some1 can point me in the rite direction or show me a little code to work from thanks. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars', 1) Example() ; Simple example: Embedding an Internet Explorer Object inside an AutoIt GUI ; ; See also: http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/internetexplorer.asp Func Example() Local $oIE, $GUIActiveX, $GUI_Button_Song, $GUI_Button_Forward Local $GUI_Button_Home, $GUI_Button_Stop, $msg $oIE = ObjCreate("Shell.Explorer.2") ; Create a simple GUI for our output GUICreate("Testing something", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN)) $GUIActiveX = GUICtrlCreateObj ($oIE, 10, 40, 600, 360) $GUI_Button_Song = GUICtrlCreateButton("Random Song", 10, 420, 100, 30) $GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30) $GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30) $GUI_Button_Stop = GUICtrlCreateButton("Stop", 330, 420, 100, 30) GUISetState() ;Show GUI $oIE.navigate("www.youtube.com") ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_Button_Home $oIE.navigate("http://www.youtube.com") Case $msg = $GUI_Button_Song MsgBox(1, "Test", "Listen to this song") $oIE.navigate("http://www.youtube.com/watch?v=Qit3ALTelOo&feature=fvst") Case $msg = $GUI_Button_Forward $oIE.GoForward Case $msg = $GUI_Button_Stop $oIE.Stop EndSelect WEnd GUIDelete() EndFunc ;==>Example
  3. Wow thanks never thought id get this working but its working perfect now thanks for the reply and fixing my script
  4. Can anybody help me with this
  5. Hi it does work for Quake 3. Screenshot http://img88.imageshack.us/my.php?image=setontopec0.jpg I tested it by doing sleep(5000) WinSetOnTop("Form1", "", 1) Just wondering how to set it to a hotkey.
  6. Ok so im making a little script to show and hide a game i play called Quake 3 i got that part working but i need the GUI to show on screen when the games running because you cant alt tab from the game to get to the script So ive been trying to set (WinSetOnTop) to a Hotkey but i just cant get it to work ive tried lots of different ways so was jus hopin some1 could show me how to get it working so i know for the future Heres my code so far #include <GUIConstants.au3> #include <Misc.au3> Opt("GUICoordMode", 1) HotKeySet("{f12}", "Setontop") Local $Button_1, $Button_2, $msg $Form2 = GUICreate("Form1", 200, 200, 200, 200) GUISetBkColor(0x000000) $Button_1 = GUICtrlCreateButton("Unhide", 50, 45, 50) $Button_2 = GUICtrlCreateButton("Hide", 50, 75, 50) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_1 WinSetState("Quake 3: Arena", "", @SW_SHOW) ;Will show Quake3 Case $msg = $Button_2 WinSetState("Quake 3: Arena", "", @SW_HIDE) ; Will hide Quake3 EndSelect WEnd Func Setontop() WinSetOnTop("Form1", "", 1) EndFunc
×
×
  • Create New...