View Single Post

Kode

#include <GUIConstantsEx.au3>
Func meny()
    Local $Button_1, $Button_2, $Button_3, $Button_4, $Button_5, $Button_6, $Button_7, $Button_8, $Button_9, $Button_10 , $Button_11, $Button_12, $msg
    GuiCreate("MENY", 120, 310)

    Opt("GUICoordMode", 1)
  	$Button_1 = GuiCtrlCreateButton("Firefox", 10, 5, 100, 20)
	$Button_2 = GuiCtrlCreateButton("Calc", 10, 30, 100, 20)
	$Button_3 = GuiCtrlCreateButton("MSN", 10, 55, 100, 20)
	$Button_4 = GuiCtrlCreateButton("iExplorer", 10, 80, 100, 20)
	$Button_5 = GuiCtrlCreateButton("Paint", 10, 105 , 100, 20)
	$Button_6 = GuiCtrlCreateButton("Skype", 10, 130 , 100, 20)
	$Button_7 = GuiCtrlCreateButton("Notepad", 10, 155 , 100, 20)
	$Button_8 = GuiCtrlCreateButton("MSWORD 2007", 10, 180, 100, 20)
	$Button_9 = GuiCtrlCreateButton("MSOutlook 2007", 10, 205, 100, 20)
	$Button_10 = GuiCtrlCreateButton("MSExcel 2007", 10, 230, 100, 20)
	$Button_11 = GuiCtrlCreateButton("Explorer", 10, 255, 100, 20)
	$Button_12 = GuiCtrlCreateButton("Taskmanager", 10, 280, 100, 20)
	
    GUISetState() 

    ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop
				            Case $msg = $Button_1
                Run(@ProgramFilesDir & "\Mozilla Firefox\Firefox.exe")
				            Case $msg = $Button_2
                Run('calc.exe')
				            Case $msg = $Button_3
                Run(@ProgramFilesDir &  '\Messenger\msmsgs.exe')
				            Case $msg = $Button_4
                Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe")
				            Case $msg = $Button_5
                Run("mspaint.exe")
				            Case $msg = $Button_6
                Run(@ProgramFilesDir & "\Skype\Phone\Skype.exe")
				            Case $msg = $Button_7
                Run('Notepad.exe') 
							Case $msg = $Button_8
				Run(@ProgramFilesDir & "\Microsoft Office\Office12\WINWORD.EXE")
				            Case $msg = $Button_9
                Run(@ProgramFilesDir & "\Microsoft Office\Office12\OUTLOOK.EXE")		
				            Case $msg = $Button_10
                Run(@ProgramFilesDir & "\Microsoft Office\Office12\EXCEL.EXE")			
				            Case $msg = $Button_11
                Run('explorer.exe')
							Case $msg = $Button_12
                Run('task.exe')
				
				
			EndSelect
		
    WEnd
EndFunc 

Func Terminate()
    Exit 0
EndFunc
 
	HotKeySet("+z","meny")
	HotKeySet("+x", "Terminate")

While 1
  Sleep(100)
WEnd