Exec.ContextMenu
Description
- Shows the right-click menu of a file, folder, or the window under the mouse.
- Or you can specify a file or folder to get the context menu for that file.
Syntax
- Exec.ContextMenu(path_or_obj)
Parameters
- path_or_obj
- (string) either:
- path to a file or folder
- name of an object from the Desktop or My Computer virtual folders
- Optional.
- If this parameter is representing an object, the same name must be used as is seen when the object is viewed in Explorer. (e.g. "My Documents")
Examples
- Exec.ContextMenu
- Shows the context menu of the window under the mouse.
- Note this will not work with all programs. Some that don't work include:
- Exec.ContextMenu(?"c:\program files\powerpro\scripts\test.powerpro")
- Shows the context menu for the file "test.powerpro", taken as if it were being viewed in Explorer.
- Exec.ContextMenu(?"c:\program files\powerpro\scripts")
- Shows the context menu for the file "test.powerpro", taken as if it were being viewed in Explorer.
- Exec.ContextMenu("My Computer")
Notes
- To close a PowerPro-created context menu, click the menu header (bold text bit), then click away.
- PowerPro Help recommends following this command with a
Win.Keys("{to menu}…")
command to select an entry from the menu, but it doesn't seem to be working..?