Hi guys, glad to be in here. Only just installed the trial of KBM and I'm looking to find out if two things are possible:
When in any web browser (Brave or Vivaldi usually) is it possible to copy a URL shortcut to the desktop but have the URL named as per the page title with non-alpha numeric characters stripped out?
Select a group of files (preferably in Forklift) and rename them based on a set of rules (similar to what Forklift can do) but with a more reliability?
I've used AppleScript to specifically get the page title and URL from Brave, and this method should work with Vivaldi as well by substituting 'Vivaldi' for 'Brave Browser' in the AppleScript.
You can also use the front browser URL token like so:
Hi Chris, the first macro works perfectly apart it will only execute when I hit the Run command in the Editor. Hitting F1 (or any other hotkey I try) seems not to execute it at all. Newbie time I guess. What am I missing?
It has only the most rudimentary AppleScript dictionary, so you basically can't do jack with it.
However – Keyboard Maestro can often make the impossible possible on a Mac.
Quick Select works quite well in ForkLift and supports regular expressions.
⌘S
Quick Open give access to various commands, saved rename specifications, and suchlike.
Escape
You can also assign a keyboard shortcut to 'Copy Path to Clipboard', copy the paths of the selection, and then use AppleScript to operate on those files in the Finder.
So you can make ForkLift behave more the way you want it to.
Hi dbrewood, welcome to Keyboard Maestro (KM) and its Forum.
KM is one of the best Mac automation tools available, its Forum is one of the best and friendliest forums on the Internet. Whenever you reach a tough stumbling block trying to use KM, please feel free to post your question/problem here for help.
In the future, please post each question as a separate topic, with a Topic Title that reflects the nature of the question.
This time I have changed your Topic Title to reflect both questions.
Hi Chris, alas no difference at all. I can have Brave fronted and with the Editor open hit 'Run' and it works perfectly. If I hit the F18 I selected to run the macro nothing at all. Interestingly enough if I change the hotkey to a KBM key I already have assigned instead of getting the choice popup it just executes the original macro I assigned.
Thought - to import the macro I just double clicked on it, should I have done it some other way? Also if I click on 'Enabled Macros' it is not in the list, but as far as I can see it looks to be enabled? Or again I'm missing the obvious.
Hi Chris, correct that was what the issue was
I have now set up a Brave group as you recommended.
The only 'slight' issue that I have, which I don't think can be fixed, is that of the '.webloc' extension being on the file created. I I dragged a URL onto the desktop the shortcut created does not have the '.webloc' on it at all so looks much neater. I can live with it of course and I'm not complaining at all. Just it'd be neater not to have it visible.
It's weird as if I look at both types of shortcut in Finder they both look the same and both show the extension, just the ones dragged there do not show '.webloc'. Macs are weird!
@ccstone an interesting one to note this morning. I've modified the macro to work with Vivaldi (same issue applies in Brave though) and for some pages like this one, the webloc shortcut is created, but when looking to click on the desktop to open it Safari executes and fails to load the page. Other YouTube videos seem fine.....
I've experimented with using the same Macro in Brave and Vivaldi and both exhibit the same issue. Weird. Anyway I thought it worth feeding back...
I've fixed this in the macro by adding the appropriate Filter action for the URL.
I've also made the macro browser-agnostic (to a point) – it now supports Safari and all Google Chrome variants that Keyboard Maestro's FrontBrowser token supports.