Guest User

It's Learning TestNope

a guest
May 27th, 2015
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 2.28 KB | None | 0 0
  1. #cs ----------------------------------------------------------------------------
  2.  
  3.  AutoIt Version: 3.3.12.0
  4.  Author: ontheroad @freak.no
  5.  Editor: onClipEvent @freak.no
  6.  
  7.  Script Function:
  8.     Open a GUI with hotkey "SHIFT Z" and close with "SHIFT X".
  9.  
  10. #ce ----------------------------------------------------------------------------
  11.  
  12. ; Script Start
  13.  
  14. #include <GUIConstantsEx.au3>
  15. Func menu()
  16.     Local $Button_1, $Button_2, $Button_4, $Button_3, $Button_5, $Button_6, $Button_7, $Button_8, $Button_9, $msg
  17.     GuiCreate("MENY", 120, 230)
  18.  
  19.     Opt("GUICoordMode", 1)
  20.     $Button_1 = GuiCtrlCreateButton("Firefox", 10, 5, 100, 20)
  21.     $Button_2 = GuiCtrlCreateButton("Calc", 10, 30, 100, 20)
  22.     $Button_3 = GuiCtrlCreateButton("Chrome", 10, 55, 100, 20)
  23.     $Button_4 = GuiCtrlCreateButton("iExplorer", 10, 80, 100, 20)
  24.     $Button_5 = GuiCtrlCreateButton("Paint", 10, 105 , 100, 20)
  25.     $Button_6 = GuiCtrlCreateButton("Skype", 10, 130 , 100, 20)
  26.     $Button_7 = GuiCtrlCreateButton("Notepad", 10, 155 , 100, 20)
  27.     $Button_8 = GuiCtrlCreateButton("Explorer", 10, 180, 100, 20)
  28.     $Button_9 = GuiCtrlCreateButton("Taskmanager", 10, 205, 100, 20)
  29.    
  30.     GUISetState()
  31.  
  32.     ; Run the GUI until the dialog is closed
  33.     While 1
  34.         $msg = GUIGetMsg()
  35.         Select
  36.             Case $msg = $GUI_EVENT_CLOSE
  37.                 ExitLoop
  38.                             Case $msg = $Button_1
  39.                 Run(@ProgramFilesDir & "\Mozilla Firefox\firefox.exe")
  40.                             Case $msg = $Button_2
  41.                 Run('calc.exe')
  42.                             Case $msg = $Button_3
  43.                 run(@ProgramFilesDir & "\Google\Chrome\Application\chrome.exe")
  44.                             Case $msg = $Button_4
  45.                 Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe")
  46.                             Case $msg = $Button_5
  47.                 Run("mspaint.exe")
  48.                             Case $msg = $Button_6
  49.                 Run(@ProgramFilesDir & "\Skype\Phone\Skype.exe")
  50.                             Case $msg = $Button_7
  51.                 Run('Notepad.exe')     
  52.                             Case $msg = $Button_8
  53.                 Run('explorer.exe')
  54.                             Case $msg = $Button_9
  55.                 Run('taskmgr.exe')
  56.                
  57.             EndSelect
  58.        
  59.     WEnd
  60. EndFunc
  61.  
  62. Func Terminate()
  63.     Exit 0
  64. EndFunc
  65.  
  66.     HotKeySet("+z","menu")
  67.     HotKeySet("+x", "Terminate")
  68.  
  69. While 1
  70.   Sleep(100)
  71. WEnd
Add Comment
Please, Sign In to add comment