GefContextMenuItem.GetScriptAction (method)

If the action is a script it will return true and retieve the script information
Syntax: Boolean = object.GetScriptAction ( ScriptEntryPoint, UserParamater )
ScriptEntryPoint As BSTR* - The name of the script entry point
UserParamater As BSTR* - The user paramater
Description: The GetScriptAction method returns true if the menu item's action is to run a script and retrieves the script entry point and user paramater. If the action is not to run a script it returns False.


Sub OnMyMenu4
  MsgBox "OnMyMenu4"
End Sub
Sub OnMyMenu3
  MsgBox "OnMyMenu3"
End Sub
Sub OnMyMenu2
  MsgBox "OnMyMenu2"
End Sub
Sub OnMyMenu1
  MsgBox "OnMyMenu1"
End Sub
Sub OnPreContextMenu(oContextMenu As GefContextMenu)
  Dim oContextMenuItem As GefContextMenuItem
  Dim oMenuItems As GefContextMenuItems
  Set oMenuItems = oContextMenu.MenuItems
  Set oContextMenuItem = oMenuItems.Add
  oContextMenuItem.Text = "Custom script menu items"
  Dim oSubMenu As GefContextMenu
  Set oSubMenu = oContextMenuItem.SubMenu
  Dim oSubMenuItem As GefContextMenuItem
  Set oSubMenuItem = oSubMenu.MenuItems.Add
  oSubMenuItem.SetActionToScript "OnMyMenu1"
  oSubMenuItem.Text = "OnMyMenu1"
  oSubMenuItem.Checked = True
  oSubMenuItem.Translated = False
  Dim entry As String
  Dim userParm As String
  If oSubMenuItem.GetScriptAction(entry, userParm) Then
    MsgBox "The script entry point is: " & entry & ebCRLF _
         & "The user paramater is: "& userParm
  End If
End Sub