If the action is a script it will return true and retieve the script information | |
Syntax: | Boolean = object.GetScriptAction ( ScriptEntryPoint, UserParamater ) |
Parameters: |
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. Example: 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.MakeSubMenu 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 |