Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

SyntaxColoring.CommentLinks.SetEnabled

Sets whether comment links are enabled.

Component Version macOS Windows Linux Server iOS SDK
SyntaxColoring 12.3 ✅ Yes ❌ No ❌ No ❌ No ❌ No
MBS( "SyntaxColoring.CommentLinks.SetEnabled"; Value )   More

Parameters

Parameter Description Example
Value The new setting.
Pass 1 to enable or 0 to disable.
1

Result

Returns OK or error.

Description

Sets whether comment links are enabled.
If enabled, the plugin will scan comments in script lines for URLs and add a little arrow with earth icon on the right. Once clicked, the URL is opened in the default browser.

Works for http://, https://, mailto: and fmp:// URLs. Text before/after is ignored if there is at least a space between. Invalid URLs are ignored, e.g. with non URL component encoded accent characters.

When the URL starts with "fmp://$/?", we insert the current file name as file name before the ?.

In version 13.5 we added goto: and script: URL support. Goto can have a line number or the keyword start or end to jump to the start of the script or the end. The script: URL contains the perfect encoded script name.

Examples

Sample Script with links:

# There is a link in the next line:
# https://www.mbsplugins.de/filemaker ➜🌍 
# There can be text before the link http://www.mbsplugins.de and text behind ➜🌍 
#
# other URLs with fmp://test work, too. ➜🌍 
# or email links with mailto prefix: mailto:test@test.test ➜🌍

See also

Release notes

Blog Entries

This function is free to use.

Created 3th June 2022, last changed 25th January 2024


SyntaxColoring.CommentLinks.GetEnabled - SyntaxColoring.ContextualMenuEnabled.GetEnabled