Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.89 KB | None | 0 0
  1. #include <ButtonConstants.au3>
  2. #include <EditConstants.au3>
  3. #include <GUIConstantsEx.au3>
  4. #include <WindowsConstants.au3>
  5. #include <WinAPI.au3>
  6.  
  7. Dim $aItems[3] = ["Hi", "Wie gehts?", "Tschüss"]
  8.  
  9. $hIems = GUICreate("Test", 259, 138, -1, -1)
  10. GUISetFont(12, 400, 0, "Arial")
  11. $Button1 = GUICtrlCreateButton("Button1", 16, 56, 64, 64)
  12. $Title = GUICtrlCreateInput("---", 16, 16, 233, 26)
  13. $Arrow = GUICtrlCreateUpdown($Title)
  14. $Button2 = GUICtrlCreateButton("Button2", 96, 56, 64, 64)
  15. $Button3 = GUICtrlCreateButton("Button3", 176, 56, 64, 64)
  16. GUISetState(@SW_SHOW)
  17.  
  18. GUIRegisterMsg($WM_COMMAND, "_MY_WM_COMMAND")
  19.  
  20. While 1
  21.     $nMsg = GUIGetMsg()
  22.     Switch $nMsg
  23.         Case -3
  24.             Exit
  25. ;~      Case $Arrow
  26.     EndSwitch
  27. WEnd
  28.  
  29. Func _MY_WM_COMMAND($hWnd, $nMsg, $wParam, $lParam)
  30.     ConsoleWrite(BitShift($wParam, 16) & ' ' & BitAND($wParam, 0xFFFF) & ' ' & GUICtrlRead(BitAND($wParam, 0xFFFF), 1) & @CR)
  31. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement