3.1. Create Scripts for Before Context Menu/Before Editor Context Menu Events
About this task
Before Context Menu Event
Procedure
- Click the Popup button to the right of the Before context menu event field.
-
Select New Script on the Popup menu.
An Edit Script window opens with the following default code.
Sub OnPreContextMenu(oContextMenu As GefContextMenu) End Sub
- Write and compile the script that is needed for the Before Context Menu event.
-
Close the Edit Script window.
The Save global script browser opens.
-
Do the following.
Item Field Action A File name Enter a name for the script. B File of type Select a script type. Options are: *.cms or *.bcl -
Click Open.
The script can be applied to the Before context menu event.
- Click the Arrow button to the right of the Before context menu event.
-
Select one of the following.
Option Result <No action> The Before context menu event will not be used. Script Entry point Is triggered when a user opens a Popup (Context) menu on any CimView screen.
Before Editor Context Menu Event
Procedure
- Click the Popup button to the right of the Before editor context menu event field.
-
Select New Script on the Popup menu.
An Edit Script window opens with the following default code.
Sub OnEditorPreContextMenu(oContextMenu As GefContextMenu) End Sub
- Write and compile the script that is needed for the Before Editor Context Menu event.
-
Close the Edit Script window.
The Save global script browser opens.
-
Do the following.
Field Action A File name Enter a name for the script. B File of type Select a script type. Options are: *.cms or *.bcl -
Click Open.
Result: The script can be applied to the Before context menu event.
- Click the Arrow button to the right of the Before context menu event.
-
Select one of the following.
Option Result A <No action> The Before context menu event will not be used. B Script Entry point Is triggered when a user opens a Popup (Context) menu on any CimView screen.