Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 4.02 KB | None | 0 0
  1. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
  2. #AutoIt3Wrapper_Icon=warning.ico
  3. #AutoIt3Wrapper_Outfile=AWChoiceTest2.exe
  4. #AutoIt3Wrapper_Run_Tidy=y
  5. #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
  6. #include <WindowsConstants.au3>
  7. #include <GUIConstantsEx.au3>
  8. #include <ButtonConstants.au3>
  9. #include <StaticConstants.au3>
  10.  
  11.  
  12.  
  13. If $CmdLine[0] < 2 Then
  14.     exit (-1)
  15. EndIf
  16. $anzahlButtons = $CmdLine[1]
  17. If $anzahlButtons = 1 Then
  18.     If $CmdLine[0] >= 3 Then
  19.         $Frage = $CmdLine[2]
  20.         $Button1 = $CmdLine[3]
  21.     Else
  22.         Exit (-1)
  23.     EndIf
  24. EndIf
  25.  
  26. If $anzahlButtons = 2 Then
  27.     If $CmdLine[0] >= 4 Then
  28.         $Frage = $CmdLine[2]
  29.         $Button1 = $CmdLine[3]
  30.         $Button2 = $CmdLine[4]
  31.     Else
  32.         Exit (-1)
  33.     EndIf
  34. EndIf
  35.  
  36. If $anzahlButtons = 3 Then
  37.     If $CmdLine[0] >= 5 Then
  38.         $Frage = $CmdLine[2]
  39.         $Button1 = $CmdLine[3]
  40.         $Button2 = $CmdLine[4]
  41.         $Button3 = $CmdLine[5]
  42.     Else
  43.         Exit (-1)
  44.     EndIf
  45. EndIf
  46.  
  47. If $anzahlButtons = 4 Then
  48.     If $CmdLine[0] >= 6 Then
  49.         $Eingabefeld = $CmdLine[6]
  50.         $ButtonOk = $CmdLine[7]
  51.  
  52.     Else
  53.         Exit (-1)
  54.     EndIf
  55. EndIf
  56.  
  57. If $anzahlButtons = 1 Then
  58.  
  59.     $InputWindow = GUICreate("", @DesktopWidth, @DesktopHeight, -1, -1, $ws_popup, BitOR($WS_EX_TOPMOST, $ws_ex_dlgmodalframe))
  60.     $WindowButton1 = GUICtrlCreateButton($Button1, (@DesktopWidth / 2) - 100, @DesktopHeight - 150, 200, 100, $BS_MULTILINE)
  61.     $WindowFrage = GUICtrlCreateLabel($Frage, 200, 100, @DesktopWidth - 400, 250, $SS_CENTER)
  62.     GUICtrlSetFont($WindowFrage, 16, 600)
  63.     GUICtrlSetFont($WindowButton1, 16, 600)
  64.     GUISetState(@SW_SHOW, $InputWindow)
  65.     While 1
  66.         $msg = GUIGetMsg()
  67.         Select
  68.             Case $msg = $WindowButton1
  69.                 Exit (1)
  70.         EndSelect
  71.     WEnd
  72.  
  73. EndIf
  74.  
  75. If $anzahlButtons = 2 Then
  76.  
  77.     $InputWindow = GUICreate("", @DesktopWidth, @DesktopHeight, -1, -1, $ws_popup, BitOR($WS_EX_TOPMOST, $ws_ex_dlgmodalframe))
  78.     $WindowButton1 = GUICtrlCreateButton($Button1, 50, @DesktopHeight - 150, 300, 100, $BS_MULTILINE)
  79.     $WindowButton2 = GUICtrlCreateButton($Button2, @DesktopWidth - 350, @DesktopHeight - 150, 300, 100, $BS_MULTILINE)
  80.     $WindowFrage = GUICtrlCreateLabel($Frage, 200, 100, @DesktopWidth - 400, 250, $SS_CENTER)
  81.     GUICtrlSetFont($WindowFrage, 16, 600)
  82.     GUICtrlSetFont($WindowButton1, 16, 600)
  83.     GUICtrlSetFont($WindowButton2, 16, 600)
  84.     GUISetState(@SW_SHOW, $InputWindow)
  85.     While 1
  86.         $msg = GUIGetMsg()
  87.         Select
  88.             Case $msg = $WindowButton1
  89.                 Exit (1)
  90.             Case $msg = $WindowButton2
  91.                 Exit (2)
  92.         EndSelect
  93.     WEnd
  94.  
  95. EndIf
  96.  
  97. If $anzahlButtons = 3 Then
  98.  
  99.     $InputWindow = GUICreate("", @DesktopWidth, @DesktopHeight, -1, -1, $ws_popup, BitOR($WS_EX_TOPMOST, $ws_ex_dlgmodalframe))
  100.     $WindowButton1 = GUICtrlCreateButton($Button1, 50, @DesktopHeight - 150, 300, 100, $BS_MULTILINE)
  101.     $WindowButton2 = GUICtrlCreateButton($Button2, @DesktopHeight - 500, @DesktopHeight - 150, 300, 100, $BS_MULTILINE)
  102.     $WindowButton3 = GUICtrlCreateButton($Button3, @DesktopWidth - 300, @DesktopHeight - 150, 300, 100, $BS_MULTILINE)
  103.     $WindowFrage = GUICtrlCreateLabel($Frage, 200, 100, @DesktopWidth - 400, 250, $SS_CENTER)
  104.     GUICtrlSetFont($WindowFrage, 16, 600)
  105.     GUICtrlSetFont($WindowButton1, 16, 600)
  106.     GUICtrlSetFont($WindowButton2, 16, 600)
  107.     GUICtrlSetFont($WindowButton3, 16, 600)
  108.     GUISetState(@SW_SHOW, $InputWindow)
  109.  
  110.  
  111.     While 1
  112.         $msg = GUIGetMsg()
  113.         Select
  114.             Case $msg = $WindowButton1
  115.                 Exit (1)
  116.             Case $msg = $WindowButton2
  117.                 Exit (2)
  118.             Case $msg = $WindowButton3
  119.                 Exit (3)
  120.         EndSelect
  121.     WEnd
  122.  
  123. EndIf
  124.  
  125. If $anzahlButtons = 4 Then
  126.  
  127.     $InputWindow = GUICreate("", @DesktopWidth, @DesktopHeight, -1, -1, $ws_popup, BitOR($WS_EX_TOPMOST, $ws_ex_dlgmodalframe))
  128.     $WindowButtonOK = GUICtrlCreateButton($ButtonOk, @DesktopWidth - 300, @DesktopHeight - 150, 300, 100, $BS_MULTILINE)
  129.     $WindowEingabefeld = GUICtrlCreateInput($Eingabefeld, 200, 100, @DesktopWidth - 400, 250, $SS_CENTER)
  130.     GUICtrlCreateInput("ok", 10, 35, 300, 20)
  131.     GUICtrlSetFont($WindowButtonOK, 16, 600)
  132.     GUISetState(@SW_SHOW, $InputWindow)
  133.  
  134.  
  135.     While 1
  136.         $msg = GUIGetMsg()
  137.         Select
  138.             Case $msg = $WindowButtonOK
  139.                 Exit (1)
  140.         EndSelect
  141.     WEnd
  142.  
  143. EndIf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement