Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

MenuItem.SetURL

Sets the URL to query when menuitem is used.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Menu 6.5 Yes Yes No No No

MBS( "MenuItem.SetURL"; item; URL )

Parameters

Parameter Description Example value
item The reference to the menu item. Please create one with MenuItem.CreateMenuItem or MenuItem.CreateSeparator. $item
URL The URL to trigger.

Result

Returns OK or error.

Description

Sets the URL to query when menuitem is used.
$$ID$$ in the URL is replaced with menu ID.
Queries http/ftp/sftp URLs with CURL, other URLs passed to OS to open.

Examples

Create menu to open email application:

Set Variable [$item; Value:MBS("MenuItem.CreateMenuItem"; "Send Email to Support")]
Set Variable [$r; Value:MBS("MenuItem.SetURL"; $item; "mailto:support@monkeybreadsoftware.test")]
Set Variable [$r; Value:MBS("Menu.AddItem"; $menu; $item)]

See also


MenuItem.SetToolTip   -   MenuItem.SetUnderline

Feedback: Report problem or ask question.




Links
MBS Xojo PDF Plugins