Reference Manual - Table of Contents Events Command Summary:
Events status
SetCmdKey char, SubFunction Summary:
var = EventCode( code )
Events status
This command can set the frequency (1-10) or disable event checking (0). By temporarily disabling events you can speed critical processing. The default value is 1 which sets event checking on but less frequent.
The maximum setting is 10 which will cause event checking to occur very frequently. Note that a higher the setting is the slower your application is liekly to run.
status - This is a numeric value which is zero (0) to disable event processing or set from 1 to 10 to set event checking. Default = 1
SetCmdKey char, Sub
This command sets a command key to call a Sub procedure or clears an existing definition.
char - This is a numeric value representing the ASCII code of the key used in conjunction with the Command key.
Sub - This is a reference to the a SUB procedure that will be called when the designated Command key is pressed. Use NONE to clear the Command key.
var = EventCode( code )
This function returns a numeric value that represents the event codes that caused a Sub procedure to be called. This is usually used in a Sub procedure that was called by MacStandardBasic in response to an event such as a mouse click in a contro1, window, or menu.
code - This argument should be a numeric value from 0 to 3 that indicates which event code parameter to be returned.
EventCode Return Values
EventCode( 0 ) = 1 The window content area was clicked on. If the user
clicks on a control on the content area, that event will take precedence.
EventCode( 1 ) = Window #
EventCode( 0 ) = 2 Command Button control was selected.
EventCode( 1 ) = Window #
EventCode( 2 ) = Control #
EventCode( 0 ) = 3 CheckBox control was selected.
EventCode( 1 ) = Window #
EventCode( 2 ) = Control #
EventCode( 0 ) = 4 Radio Button control was selected.
EventCode( 1 ) = Window #
EventCode( 2 ) = Control #
EventCode( 0 ) = 5 Scrollbar control was changed.
EventCode( 1 ) = Window #
EventCode( 2 ) = Control #
EventCode( 0 ) = 6 Droplist control was selected.
EventCode( 1 ) = Window #
EventCode( 2 ) = Control #
EventCode( 0 ) = 7 Double click on an item ListBox control.
EventCode( 1 ) = Window #
EventCode( 2 ) = Control #
EventCode( 0 ) = 8 Picture control was selected.
EventCode( 1 ) = Window #
EventCode( 2 ) = Control #
EventCode( 0 ) = 9 Icon control was selected.
EventCode( 1 ) = Window #
EventCode( 2 ) = Control #
EventCode( 0 ) = 10 Label control was selected.
EventCode( 1 ) = Window #
EventCode( 2 ) = Control #
EventCode( 0 ) = 11 Textbox control was clicked on to position cursor
or text was selected.
EventCode( 1 ) = Window #
EventCode( 2 ) = Control #
EventCode( 0 ) = 12 TextBox control has a keyboard event.
EventCode( 1 ) = Window #
EventCode( 2 ) = Control #
EventCode( 3 ) = Character Code
EventCode( 0 ) = 13 Menubar item was selected.
EventCode( 1 ) = Menu #
EventCode( 2 ) = Menu Item #
EventCode( 0 ) = 21 Windows Close Box was selected.
EventCode( 1 ) = Window #
EventCode( 0 ) = 22 Windows Zoom Box was selected.
EventCode( 1 ) = Window #
EventCode( 0 ) = 23 Windows Grow Box was selected.
EventCode( 1 ) = Window #
EventCode( 0 ) = 24 Windows Close Box was selected.
EventCode( 1 ) = Window #
EventCode( 0 ) = 25 Windows Close Box was updated.
EventCode( 1 ) = Window #
EventCode( 0 ) = 26 Key event in a window without active textbox.
EventCode( 1 ) = Window #
EventCode( 2 ) = ASCII Character Code
EventCode( 3 ) = Special Key Status
EventCode( 3 ) Values
Add 1 = Shift Key Held Down
Add 2 = Command Key Held Down
Add 4 = Control Key Held Down
Add 8 = Option Key Held Down