Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
- #AutoIt3Wrapper_Icon=warning.ico
- #AutoIt3Wrapper_Outfile=AWChoiceTest2.exe
- #AutoIt3Wrapper_Run_Tidy=y
- #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
- #include <WindowsConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <ButtonConstants.au3>
- #include <StaticConstants.au3>
- If $CmdLine[0] < 2 Then
- exit (-1)
- EndIf
- $anzahlButtons = $CmdLine[1]
- If $anzahlButtons = 1 Then
- If $CmdLine[0] >= 3 Then
- $Frage = $CmdLine[2]
- $Button1 = $CmdLine[3]
- Else
- Exit (-1)
- EndIf
- EndIf
- If $anzahlButtons = 2 Then
- If $CmdLine[0] >= 4 Then
- $Frage = $CmdLine[2]
- $Button1 = $CmdLine[3]
- $Button2 = $CmdLine[4]
- Else
- Exit (-1)
- EndIf
- EndIf
- If $anzahlButtons = 3 Then
- If $CmdLine[0] >= 5 Then
- $Frage = $CmdLine[2]
- $Button1 = $CmdLine[3]
- $Button2 = $CmdLine[4]
- $Button3 = $CmdLine[5]
- Else
- Exit (-1)
- EndIf
- EndIf
- If $anzahlButtons = 4 Then
- If $CmdLine[0] >= 6 Then
- $Eingabefeld = $CmdLine[6]
- $ButtonOk = $CmdLine[7]
- Else
- Exit (-1)
- EndIf
- EndIf
- If $anzahlButtons = 1 Then
- $InputWindow = GUICreate("", @DesktopWidth, @DesktopHeight, -1, -1, $ws_popup, BitOR($WS_EX_TOPMOST, $ws_ex_dlgmodalframe))
- $WindowButton1 = GUICtrlCreateButton($Button1, (@DesktopWidth / 2) - 100, @DesktopHeight - 150, 200, 100, $BS_MULTILINE)
- $WindowFrage = GUICtrlCreateLabel($Frage, 200, 100, @DesktopWidth - 400, 250, $SS_CENTER)
- GUICtrlSetFont($WindowFrage, 16, 600)
- GUICtrlSetFont($WindowButton1, 16, 600)
- GUISetState(@SW_SHOW, $InputWindow)
- While 1
- $msg = GUIGetMsg()
- Select
- Case $msg = $WindowButton1
- Exit (1)
- EndSelect
- WEnd
- EndIf
- If $anzahlButtons = 2 Then
- $InputWindow = GUICreate("", @DesktopWidth, @DesktopHeight, -1, -1, $ws_popup, BitOR($WS_EX_TOPMOST, $ws_ex_dlgmodalframe))
- $WindowButton1 = GUICtrlCreateButton($Button1, 50, @DesktopHeight - 150, 300, 100, $BS_MULTILINE)
- $WindowButton2 = GUICtrlCreateButton($Button2, @DesktopWidth - 350, @DesktopHeight - 150, 300, 100, $BS_MULTILINE)
- $WindowFrage = GUICtrlCreateLabel($Frage, 200, 100, @DesktopWidth - 400, 250, $SS_CENTER)
- GUICtrlSetFont($WindowFrage, 16, 600)
- GUICtrlSetFont($WindowButton1, 16, 600)
- GUICtrlSetFont($WindowButton2, 16, 600)
- GUISetState(@SW_SHOW, $InputWindow)
- While 1
- $msg = GUIGetMsg()
- Select
- Case $msg = $WindowButton1
- Exit (1)
- Case $msg = $WindowButton2
- Exit (2)
- EndSelect
- WEnd
- EndIf
- If $anzahlButtons = 3 Then
- $InputWindow = GUICreate("", @DesktopWidth, @DesktopHeight, -1, -1, $ws_popup, BitOR($WS_EX_TOPMOST, $ws_ex_dlgmodalframe))
- $WindowButton1 = GUICtrlCreateButton($Button1, 50, @DesktopHeight - 150, 300, 100, $BS_MULTILINE)
- $WindowButton2 = GUICtrlCreateButton($Button2, @DesktopHeight - 500, @DesktopHeight - 150, 300, 100, $BS_MULTILINE)
- $WindowButton3 = GUICtrlCreateButton($Button3, @DesktopWidth - 300, @DesktopHeight - 150, 300, 100, $BS_MULTILINE)
- $WindowFrage = GUICtrlCreateLabel($Frage, 200, 100, @DesktopWidth - 400, 250, $SS_CENTER)
- GUICtrlSetFont($WindowFrage, 16, 600)
- GUICtrlSetFont($WindowButton1, 16, 600)
- GUICtrlSetFont($WindowButton2, 16, 600)
- GUICtrlSetFont($WindowButton3, 16, 600)
- GUISetState(@SW_SHOW, $InputWindow)
- While 1
- $msg = GUIGetMsg()
- Select
- Case $msg = $WindowButton1
- Exit (1)
- Case $msg = $WindowButton2
- Exit (2)
- Case $msg = $WindowButton3
- Exit (3)
- EndSelect
- WEnd
- EndIf
- If $anzahlButtons = 4 Then
- $InputWindow = GUICreate("", @DesktopWidth, @DesktopHeight, -1, -1, $ws_popup, BitOR($WS_EX_TOPMOST, $ws_ex_dlgmodalframe))
- $WindowButtonOK = GUICtrlCreateButton($ButtonOk, @DesktopWidth - 300, @DesktopHeight - 150, 300, 100, $BS_MULTILINE)
- $WindowEingabefeld = GUICtrlCreateInput($Eingabefeld, 200, 100, @DesktopWidth - 400, 250, $SS_CENTER)
- GUICtrlCreateInput("ok", 10, 35, 300, 20)
- GUICtrlSetFont($WindowButtonOK, 16, 600)
- GUISetState(@SW_SHOW, $InputWindow)
- While 1
- $msg = GUIGetMsg()
- Select
- Case $msg = $WindowButtonOK
- Exit (1)
- EndSelect
- WEnd
- EndIf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement