Mouse Right Click

Right-click the mouse on the specified object to run the script operation.

Note: This trigger is supported on SP5000 Series Open Box (Windows 10 IoT Enterprise Model), IPC series, and PC/AT.

For models that support this trigger, see the following.

Supported Model/Feature List
Block

Text

onRightClick($GraphicObject, ()=>{
    1             2
})

1: Operation

2: Target object

Note: For information about the objects which is available in Target Object, refer to the following.

Supported Objects

Operation

[Right Click]

[Right Press]

[Right Release]

[Right Hold]

[Right Double Click]

[Right Click]

The operation is triggered when you right-click the target object once.

Block

Text

onRightClick($GraphicObject.Switch1, () => {

});

Note:
  • If you press the right-click button on the object and slide the mouse outside the object area without releasing the right-click button, the right-click is canceled.
  • The [Right Click] trigger is NOT activated in the following cases.
    • Object does not display anymore due to a screen or content change.
    • The interlock function is enabled on the object.
    • The user logs out.
    • Project file is transferred.
    • Run time is shutdown.
    • Run time is restarted.
    • The Windows active window changes from the run-time application to a different application.

[Right Press]

The operation is triggered when you press the right-click button on the target object.

Block

Text

onRightPress($GraphicObject.Switch1, () => {
});

1: EnableDelay

After the right-click button is pressed for the specified amount of time, the operation is run.

Block

Select the check box to set a delay time.

Text

To set a delay time (for example, 10*100 ms) in Text mode, use

onRightPressWithDelay($GraphicObject.Switch1, 10, () => {
});

Timing Chart

Example 1 : Operation is triggered
Example 2 : Operation is triggered : Delay Time
Example 3 : Operation is triggered : Operation is NOT triggered : Delay Time

[Right Release]

The operation is triggered when you release the right-click button from the object.

Block

Text

onRightRelease($GraphicObject.Switch1, () => {
});

1: EnableDelay

After the right-click button on the object is released and the specified time elapses, the operation is run.

Block

Select the check box to set a delay time.

Text

To set a delay time (for example, 10*100 ms) in Text mode, use

onRightReleaseWithDelay($GraphicObject.Switch1, 10, () => {
});

WARNING

TRIGGER BEHAVIOR

When designing the [Right Release] trigger, take into account that the [Right Release] trigger is also activated when the target object is no longer touchable.

Failure to follow these instructions can result in death, serious injury, or equipment damage.

Note: The [Right Release] trigger is also activated in the following cases.
  • The target object is no longer touchable due to screen/content display change
  • The target object's interlock is enabled
  • User is logged out
  • Project file transfer
  • Runtime shutdown by Runtime Application Operation (Shutdown)
  • Runtime reboot by Runtime Application Operation (Reboot)
  • Application window is no longer in focus

Timing Chart

Example 1 : Operation is triggered
Example 2 : Operation is triggered : Delay Time
Example 3 : Operation is triggered : Delay Time

Note: If both [Right Press] and [Right Release] triggers are specified on the same object, and if the right-click button is released before the [Right Press] trigger's delay time elapses, the [Right Release] trigger is executed but not the [Right Press] trigger.

: Operation is triggered by [Right Release] trigger

: Operation is NOT triggered by [Right Press] trigger

: [Right Press] Delay Time

[Right Hold]

While you continue holding down the right-click button on the object, the operation is repeatedly triggered for the specified duration. The maximum value that you can set for the [Duration] is 30 seconds.

Block

Text

onRightHold($GraphicObject.Switch1, 1000, ()=>{
});

1: EnableDelay

After the right-click button is pressed on the object for the specified amount of time, the operation is run.

Block

Select the check box to set a delay time.

Text

To set a delay time (for example, 10*100 ms) in Text mode, use

onRightHoldWithDelay($GraphicObject.Switch1, 1000, 10, ()=>{
});

Timing Chart

Example 1 : Operation is triggered : Hold Time
Example 2 : Operation is triggered : Delay Time : Hold Time

[Right Double Click]

The operation is triggered when you right-click the object two times in short succession.

Block

Text

onRightDoubleClick($GraphicObject.Switch1, ()=>{
});

Supported Objects

Shapes Supported
Parts All parts are supported, except for the following.
  • Alarm Summary
  • Ingredient Viewer
  • Picture Display
  • Web Browser
  • Hardware Configuration
  • File Manager
Predefined Images Supported
Layout Objects Not Supported
Grouped Object Not Supported
Screens / Contents Not Supported

Touch Area

The touch area is the area of the width and height that is shown when the object is selected.

In the figure below, the area in red is the touch area.