Somewhat out of scope of this thread.. but being able to access the HTML from the clipboard manager as well would be awesome.
I've recently been playing with this in my own scripts, and have been getting it like this:
osascript -e 'the clipboard as «class HTML»' \
| sed -e 's/^«data HTML//' -e 's/»$//' \
| xxd -r -p \
| sed 's/\xc2\xa0/ /g' \
Also, just in general, haven't had a chance to play with it much yet, but this is looking like it might provide a nice workflow alternative to Alfred's Universal Actions that I currently make pretty heavy use of. Will be interesting to see which one ends up winning out as my go to tool for it as things progress!
(From a pace/openness of development and engagement with bugs/feedback on the forum, BTT already wins my )
if you just want to get the current clipboard content HTML you can use BTT's run real java script:
//edit: sorry, this is broken currently. Will be fixed with next alpha
In v 5.106 you can do
get_clipboard_content:
Apple Script
tell application "BetterTouchTool" to get_clipboard_content format "public.html" asBase64 false
JavaScript
let html = get_clipboard_content({format: "public.html", base64: false});
get_selection
Apple Script
tell application "BetterTouchTool" to get_clipboard_content format "public.html" asBase64 false
JavaScript
let html = get_selection({format: "public.html", base64: false});
@Andreas_Hegenberg Something strange happened after updating to 5.105 – now, whenever I select text, it gets copied to my clipboard without me using Command-C.
I confirmed that it only happens when the BTT is running, and that the "Text Selection Did Change" automation is triggered. I haven't made any changes to the automation or floating menu since updating.
could you check whether this is still the case in 5.110 (uploading will be available in 10 min)? I can't seem to reproduce it here, maybe I already fixed it in my local build.
Hey Andreas, is there a way to Deactivate the text selection menu when I'm using Blender? I encounter a lot of issues when I use it. Additionally, since the last few versions of BTT, I have a new bug with my floating menu; it doesn’t trigger the menu when I press my key. I have to disable the group and then enable it again for my floating menu to work. and if i restart btt, i have to do it again
This preset version fixes a few bugs, adds blender to the excluded apps and adds a "Copy as HTML" item, which copies the selection as HTML if possible. This one is set to only show while pressing CMD.
This preset fixes the youtube downloader item (I accidentally broke it when I added support for rich-text): text-selection-menu21.bttpreset (273.3 KB)
If you want to use it make sure to install yt-dlp and ffmpeg first
brew install yt-dlp
brew install ffmpeg
Tomorrow I'll finalize the documentation and then release a first stable version of this feature. Maybe it also makes sense to create a split up version of the preset where every widget/extension is in a separate file so you don't always need to import the whole preset and/or can use specific items to extend your own custom menu.
Have gotten some freezing of Better Touchtool, and i have to force quit it. I think it has to do with me disabling some of the items of the menu? Whats right way to disable items of the menu? (Disableing the text selection menu stoped freezing Better Touchtool)
And also conditional activation of items. Does that need to be implemented in the script? For example only have text manipulation show in text apps. Maybe thats something that i just should wait for you to develop?
For the future it would be nice to be able to just add new buttons by downloading them like you can on popclip. But I guess its a big project. Im almost ready to ditch popclip, but the custmisation is bit too complex for my limited programing understanding. But great work so far!
Where can i see the version of an installed preset?
Disabling should not cause issues. Did you get freezes while BTT preferences UI or while using the menu? It is possible that the menu could cause issues when used in BTT itself because sometimes an app scripting itself can cause weird deadlocks. I haven't seen that, but you can try disabling the menu for BTT itself.
And also conditional activation of items. Does that need to be implemented in the script? For example only have text manipulation show in text apps. Maybe thats something that i just should wait for you to develop?
The following requires 5.122 due to a previous bug!! The easiest way to do this is by creating an additional conditional activation group. Here is an example CAG that is active for Text Edit, Xcode, VS Code and Sublime Text. Here is a simple example preset you can look at:
Now if you show the menu in e.g. Text Edit it will show these two orange buttons in addition.
For the future it would be nice to be able to just add new buttons by downloading them like you can on popclip. But I guess its a big project. Im almost ready to ditch popclip, but the custmisation is bit too complex for my limited programing understanding. But great work so far!
That is already possible. I'll split up the menu into separate files tomorrow. (In general you can export any item in BTT to a file by right-clicking it)
Where can i see the version of an installed preset?
Good point. I have now added a version name to the preset.
I'll work on a thorough tutorial, also on how to quickly transform a PopClip extension to BTT.