Added a third triggerMode: x:URL, where x is a single character (case insensitive) used to specify the browser, i.e., the first letter of one of the supported browsers: Safari, Arc, Chrome, Brave, Edge, or Vivaldi
Added the settings local_Browser_default, local_ReplaceMatchedUrl_default, local_ReloadTab_default, and local_NewWindowIfNotFound_default.
This is soooooo good _jims! v4 CallerâExample 4 is great - tried a couple others without much reading the "manual" and could tell v4 CallerâExample 4 would work. Was able to just trial & error with the three booleans and now I have two amazing macros for two different repetitive Chrome tasks.
As with many things, it wasn't that it took so much time to command tab & control tab to where I wanted... but I knew there was a better way and it was painful I hadn't set up something like this.
Minutes later, I'm as happy as a clam, calling the shortcuts via this one steadily increasing Conflict Palette. (heh, doesn't sound much like a peacetime feature, but it's great - should prob move to Macro Group Palettes or something in the future)
Added partial support for the Firefox browser. (Its AppleScript dictionary is extremely limited, so macro interaction with Firefox is a subset of other supported browsers.)
Input Format Enhancements:
Made Format 3 [YAML] the recommended structured input method due to its simpler syntax and improved readability.
Added support for both fullâline and inline comments.
Pattern Matching Enhancements:
Added webpage titleâbased matching via the new TitlePattern key, enabling regularâexpression matching against tab titles.
Added automatic inference of match logic based on which patterns are provided, with optional explicit override via the MatchLogic key:
none â ignore both URL and title patterns (inferred when neither UrlPattern nor TitlePattern is provided)
url-only â match URL pattern only (inferred when only UrlPattern is provided)
title-only â match title pattern only (inferred when only TitlePattern is provided)
or â match either URL or title pattern (inferred when both patterns are provided)
New/Enhanced Browser Action Keys:
NewWindowAlways: If 1, always open a new window, bypassing all tab matching. This is the highest-precedence overrideâwhen enabled, the browser will create a new window regardless of whether a matching tab exists.
NewTabAlways â If 1, always open a new tab in the frontmost window, bypassing all tab matching. This is the second-highest precedence override. If both NewWindowAlways and NewTabAlways are 1, NewWindowAlways takes precedence.
UrlPattern â This key also now supports a special option, -d (or --domain), which automatically sets UrlPattern to a case-insensitive representation of the Url domain: (?i)^https?://(www\.)?<domain>(?:/.*)?$ e.g., (?i)^https?://(www\.)?forum\.keyboardmaestro\.com(?:/.*)?$
TitlePattern â Regular expression pattern to match against tab titles. For example: .*Engine\.log.* to match any tab that includes "Engine.log" in the title. See Regular Expression Patterns for pattern syntax and examples.
MatchLogic â Determines how patterns are matched. Valid values: none, url-only, title-only, or
ReplaceMatched â (This key replaces ReplaceMatchedUrl.) If 1 and a pattern match is found, replace the matched tab's URL with Url. If 0, simply select the matched tab.
DryRun â If 1, process the invocation spec and echo the resolved browser action keys without actually opening any browser tabs. This is useful for debugging and inspecting how keys are resolved, inferred, and merged with preferencesâsee Key Inferences and Defaults. If 0, execute normally.
Settings / Preferences Architecture:
Consolidated preferences into a single YAMLâformatted variable: local_Preferences.
Usability Enhancements:
Smart quotes â Converts smart quotes to straight quotes in YAML and JSON.
Boolean values â Accepts 1/0, true/false, yes/no, t/f, and y/n in YAML and JSON.
Case-insensitive input â Treats key names and values as case-insensitive in both YAML and JSON.
Lenient JSON parsing â Handles imperfect JSON gracefully, including single backslashes in regularâexpression patterns.
Macro Design ImprovementâIntroduced a threeâstage processing architecture:
Stage 1 â Input processor: format detection, normalization, and inference
Stage 2 â Normalized YAML (from Stage 1) mapped to macro local variables
Backward Compatibility : Macros that calledVersion 4.0 of this macro will continue to function; however:
Key ReplaceMatchedUrl is no longer recognized; ReplaceMatched should now be used.
Format 4 [JSON] is deprecated yet remains fully supportedâaside from the removal of ReplaceMatchedUrlâwhile Format 3 [YAML] is now preferred for its simpler syntax and improved readability.
Documentation & Testing:
Expanded documentation significantly, including new Quick Start and Implementation Overview sections.
Added the DryRun key for testing configurations before browser interaction.
Thanks for making this @_jims - I use it constantly!
Is it(/will it be) possible to use it with Zen browser at all? Seems like a fair few former Arc users (including me) are switching to it now Arc's been more or less abandoned. I think it's based on Firefox, however easy/difficult that might make it to implement?
I just downloaded the Zen Browser and unfortunately it appears that it has very sparse AppleScript support (like Firefox). Also, I did a quick check and it looks like there is no Shortcuts support.
Yes, The Browser Company has shifted gears to Dia and is no longer investing heavily in Arc, but it seems that they are providing limited updates. In fact, I just downloaded one today.