home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 January / PCWELT_1_2006.ISO / pcwsoft / autoit-v3-setup.exe / Examples / GUICtrlSetLimit.au3 < prev    next >
Encoding:
Text File  |  2005-01-07  |  372 b   |  18 lines

  1. #include <GUIConstants.au3>
  2.  
  3. GUICreate("My GUI limit input 3 chars")  ; will create a dialog box that when displayed is centered
  4.  
  5. GUICtrlCreateInput("", 10,20)
  6. GUICtrlSetLimit(-1,3)    ; to limit the entry to 3 chars
  7.                 
  8. GUISetState ()
  9.  
  10. ; Run the GUI until the dialog is closed
  11. While 1
  12.     $msg = GUIGetMsg()
  13.     
  14.     If $msg = $GUI_EVENT_CLOSE Then ExitLoop
  15. Wend
  16.  
  17.  
  18.