Home THE HYPERCARD CENTER

HyperTalk Reference
Home » HyperTalk Reference » Commands

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.

click at

click at point click at point with key1 click at point with key1, key2 click at point with key1, key2, key3

The click at command clicks the mouse from within scripts. It acts exactly as if the user had clicked the mouse on the screen.

If point is within the rectangle of a button, a locked field, or anywhere else on the card, HyperCard sends the mouseDown, mouseStillDown, and mouseUp messages to the object.

If point is within the rectangle of an unlocked field, HyperCard sets the insertion point in the field.

The with key options specify combinations of the commandKey, the optionKey, and the shiftKey, just as if the user were holding down the key or keys while clicking the mouse.


Examples

click at 0,0

click at the mouseLoc

click at the mouseLoc with shiftKey,optionKey -- Option-Shift-click

Demo Script

on clickAtCloseBox
   -- Close this demo field.
   click at the loc of bkgnd button "close"
 end clickAtCloseBox

Placeholders

point
HyperTalk DefinitionAn expression that evaluates to a specific screen location, in the form of two integers separated by a comma.

Item 1 of a point is the horizontal offset (in pixels). Item 2 of a point is the vertical offset (in pixels). For example:

91,303
"91,303"
"30" & "," & "100"
the clickLoc
AppleScript DefinitionAn expression that evaluates to a specific screen location, in the form of a list with two integer elements. For example:

{ 91, 303 }clickLoc

key
In HyperTalk, one of the following:

cmdKey  
commandKey 
optionKey 
shiftKey
In AppleScript, one of the following:
  
command key 
option key 
shift key


Related Topics

« choose | HyperTalk Reference | close »


Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Modern View

Home
The HyperCard Center
HyperTalk Reference
Home » HyperTalk Reference » Commands

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.

click at

click at point click at point with key1 click at point with key1, key2 click at point with key1, key2, key3

The click at command clicks the mouse from within scripts. It acts exactly as if the user had clicked the mouse on the screen.

If point is within the rectangle of a button, a locked field, or anywhere else on the card, HyperCard sends the mouseDown, mouseStillDown, and mouseUp messages to the object.

If point is within the rectangle of an unlocked field, HyperCard sets the insertion point in the field.

The with key options specify combinations of the commandKey, the optionKey, and the shiftKey, just as if the user were holding down the key or keys while clicking the mouse.


Examples

click at 0,0

click at the mouseLoc

click at the mouseLoc with shiftKey,optionKey -- Option-Shift-click

Demo Script

on clickAtCloseBox
   -- Close this demo field.
   click at the loc of bkgnd button "close"
 end clickAtCloseBox

Placeholders

point
HyperTalk DefinitionAn expression that evaluates to a specific screen location, in the form of two integers separated by a comma.

Item 1 of a point is the horizontal offset (in pixels). Item 2 of a point is the vertical offset (in pixels). For example:

91,303
"91,303"
"30" & "," & "100"
the clickLoc
AppleScript DefinitionAn expression that evaluates to a specific screen location, in the form of a list with two integer elements. For example:

{ 91, 303 }clickLoc

key
In HyperTalk, one of the following:

cmdKey  
commandKey 
optionKey 
shiftKey
In AppleScript, one of the following:
  
command key 
option key 
shift key


Related Topics

« choose | HyperTalk Reference | close »

Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Retro View