Opened 16 years ago

Closed 16 years ago

#213 closed Bug (Fixed)

GUISetAccelerators doesn't work with enter Key from

Reported by: Wooltown Owned by: Jpm
Milestone: Component: AutoIt
Version: Severity: Blocking
Keywords: Cc:


From Beta - ENTER - doesn't work on GUISetAccelerators, worked fine on

#include <GUIConstantsEx.au3>

GUICreate("Custom Msgbox", 280, 80)

GUICtrlCreateLabel("Please click a button!", 10, 10)
$YesID = GUICtrlCreateButton("Yes", 10, 50, 50, 20)
$NoID = GUICtrlCreateButton("No", 80, 50, 50, 20)
$ExitID = GUICtrlCreateButton("Exit", 150, 50, 50, 20)
$EnterID = GUICtrlCreateButton("Enter", 220, 50, 50, 20)

; Set accelerators for Ctrl+y and Ctrl+n
Dim $AccelKeys[3][2]=[["^y", $YesID], ["^n", $NoID],["{ENTER}", $EnterID]]

GUISetState()  ; display the GUI

	$msg = GUIGetMsg()

		Case $msg = $YesID
			MsgBox(0, "You clicked on", "Yes")
		Case $msg = $NoID
			MsgBox(0, "You clicked on", "No")
		Case $msg = $ExitID
			MsgBox(0, "You clicked on", "Exit")
		Case $msg = $EnterID
			MsgBox(0, "You clicked on", "Enter")	
		Case $msg = $GUI_EVENT_CLOSE
			MsgBox(0, "You clicked on", "Close")
Until $msg = $GUI_EVENT_CLOSE Or $msg = $ExitID

Attachments (0)

Change History (2)

comment:1 Changed 16 years ago by Valik

  • Severity set to Blocking

comment:2 Changed 16 years ago by Jpm

  • Milestone set to
  • Owner set to Jpm
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jpm.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.