Pick

Description:              This function returns an indication of whether the locator (e.g. mouse) has had a specified change in its button status.

Returns:                    Numeric

Usage:                       Steady State

Format:                      Pick(X1, Y1, X2, Y2, Button)

Parameters:             X1    { numeric }  { required }  { no default: }

                                      Any numeric expression giving the X coordinate on the screen of one side of the screen area ("target").

                                    Y1    { numeric }  { required }  { no default: }

                                      Any numeric expression giving the Y coordinate on the screen of either the top or bottom of the screen area ("target").

                                    X2    { numeric }  { required }  { no default: }

                                      Any numeric expression giving the X coordinate on the screen of the side of the "target" opposite to X1.

                                    Y2    { numeric }  { required }  { no default: }

                                      Any numeric expression giving the Y coordinate on the screen of either the top or bottom of the "target," whichever is the opposite of Y1.

                                    Button    { numeric }  { required }  { no default: }

                                      Any numeric expression giving the button combination that activates this graphic when the locator cursor is within the "target" screen area.

Button

Button Locator

0

 No buttons

1

 Right button

2

 Middle button

3

 Right and middle buttons

4

 Left button

5

 Left and right buttons

6

 Left and middle buttons

7

 All three buttons

 

                             If the value is:

                             - multiplied by 8 the meaning for multiple buttons pressed becomes "OR" rather than "AND." For example, to accept any button on a 2 or 3 button mouse, use 56 (8 * 7); to accept the left mouse button regardless of whether or not the right button is pressed, use 32 (8 * 4)

                             - increased by 64, the function will become true when the mouse buttons are released rather than when they are pressed

                             - increased by 128, the button(s) must be double-clicked

                             - increased by 256, forces the control with the input focus (in the same window as the Pick) to simulate the Enter key being pressed prior to the Pick function returning a value of true. In other words, with code similar to:

  If Pick(X1, Y1, X2, Y2, 0X104);

  [

   …script statements…

  ]

                             any value affected by the control with input focus will be set to the current value of the control prior to the script statements being run.

Comments:               This function returns true if the locator button combination changes as specified by the Button parameter while the locator position is within the boundaries of the "target" ((X1,Y1) - (X2,Y2)). This function is "edge triggered" which means that it only acts upon the changes in locator button status. Making the button combination specified by the Button parameter outside the target area and then sliding the cursor into the target will not cause the function to return true. If the locator is not installed, the function will return false (0).

                             This function is very useful for capturing fast mouse button presses by the operator. VTS remembers the locations where the mouse buttons were pressed and released. The actual buttons do not have to be pressed when the Pick is actually executed since it will examine the list of all button changes since the last time it was executed.

                             This function is latched on once it becomes true. It is a resettable function and therefore will behave very much like a Click when used in an action trigger.

Example:

If Pick(300, 500, 600, 700, 56) MixerScreen;

This action will switch to the MixerScreen state when the mouse is inside the target box and any mouse button is pressed.

See Also:

Click | LocSwitch | SetXLoc | SetYLoc | Target | WinLocSwitch | WinXLoc | WinYLoc | XLoc | YLoc