$Form1 = GUICreate("Form1", 183, 92, -1,-1)
$Combo1 = GUICtrlCreateCombo("", 16, 8, 145, 25)
GUICtrlSetData(-1,'1|2|3',1)
$Button1 = GUICtrlCreateButton("Button1", 88, 40, 75, 25)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $Button1
MsgBox(64,'',GUICtrlRead($Combo1)&'.bat')
EndSwitch
WEnd
2#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 183, 92, -1,-1)
$Combo1 = GUICtrlCreateCombo("", 16, 8, 145, 25)
GUICtrlSetData(-1,'1|2|3',1)
GUICtrlSetState(-1,$GUI_FOCUS)
$Button1 = GUICtrlCreateButton("Button1", 88, 40, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Send('{down}')
Send('{up}')
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Combo1
Switch GUICtrlRead($Combo1)
Case "1"
$xz = '1.bat'
Case "2"
$xz = '2.bat'
Case "3"
$xz = '3.bat'
EndSwitch
Case $Button1
MsgBox(64,'',$xz)
EndSwitch
WEnd
|