dnnsmnstrr Posted February 24 Share Posted February 24 I made a workflow that allows searching and running named triggers with the most recent version of BetterTouchTool. Here is the GitHub repository: https://github.com/dnnsmnstrr/alfred-btt The only dependency is obviously BTT at version 4.034 or higher. Screenshots: Searching for named triggers (the Spotify triggers are not built, these are user-created) Predefined Actions (These are part of BTT) JJJJ 1 Link to comment Share on other sites More sharing options...
vitor Posted February 25 Share Posted February 25 Welcome @dnnsmnstrr, Seems like you have a hardcodeded trigger ID of 643. I always get an error when running the Script Filter: execution error: Error: Error: Message not understood. (-1708). Link to comment Share on other sites More sharing options...
dnnsmnstrr Posted February 26 Author Share Posted February 26 @vitor Thanks! The hardcoded ID is how the search for named triggers works, see here: https://community.folivora.ai/t/get-a-list-of-available-named-triggers/30390/3?u=dnnsmnstrr I was able to reproduce the error you got by changing the name of the function called in BetterTouchTool, which leads me to believe that your version of BTT is not fully up to date. Could you check what version of BetterTouchTool you are using? If it is not the most recent, the get_triggers function might not yet be supported. In that case, I guess it might be acceptable if only the predefined actions work and the script filter returns an empty array, so I added a try/catch to the script filter, in hopes that will avoid the script from crashing. Link to comment Share on other sites More sharing options...
cartern Posted February 26 Share Posted February 26 It works, I can see it can show named triggers. But if I input named triggers with English names, it can filter it well. But if I input named triggers with Chinese names, it doesn't work. Maybe it doesn't work with unicode chars? Link to comment Share on other sites More sharing options...
dnnsmnstrr Posted February 27 Author Share Posted February 27 @cartern I have some named triggers with emoji in them that do get output, so I think Unicode shouldn't be the problem. Could you give me an example of the text you used? When I create a named trigger with a random Chinese character, it does show up in Alfred, so I'm not sure what is going on, but the filtering is handled by Alfred, so if the data is passed correctly from the script filter, I don't think there's much I can do. Link to comment Share on other sites More sharing options...
cartern Posted February 27 Share Posted February 27 Thanks a lot. I checked it further and find the issue is not about Chinese, but that I can't search based on any chars after the 1st char. For example, I have a named trigger "Baidu Search", I can search it with "b" successfully like below. But if I search it with "a", it failed. Link to comment Share on other sites More sharing options...
vitor Posted February 28 Share Posted February 28 @cartern That’s how it’s supposed to work. It’s not fuzzy search, which would be slower. Link to comment Share on other sites More sharing options...
vitor Posted February 28 Share Posted February 28 @dnnsmnstrr Now the Script Filter is working. But I’ve found issues in the List Filter:This more of a suggestion: Would you separate the names in List Filter? Names are smooshed together like HideAllWindows, LeftClick, DoubleClick. If they’re separated (Hide All Windows, Left Click, Double Click) one can for example search for click and find all matching actions. As it is, the user has to know the exact option name.This is broken: Some of them have weird Subtitles and Args which don’t work. Check e.g. Home and End. Maybe you’ve imported a CSV which wasn’t well formatted? Link to comment Share on other sites More sharing options...
dnnsmnstrr Posted February 28 Author Share Posted February 28 @vitor Great! I actually didn't know the filtering works that way, so I agree that it makes sense to add spaces in the titles. The CSV you mentioned is based on a list of actions from the BTT forum, that I adapted and apparently made some mistakes with, which should now be fixed: https://github.com/dnnsmnstrr/alfred-btt/releases/tag/1.0.2 Another issue might be that some of the actions don't really work without additional parameters, but that could be added in the future after some reverse engineering / asking for more documentation. Link to comment Share on other sites More sharing options...
vitor Posted February 28 Share Posted February 28 Good call on adding the BTTFullName on the subtitles. I still found some with connected names, but they’re a handful so you could probably fix manually:Move WindowLeftMove WindowRightMax WindowLeftMax WindowRightShow/Hide SpecificAppToggle TrueTone Other than that, pretty much good to go. Link to comment Share on other sites More sharing options...
dnnsmnstrr Posted February 28 Author Share Posted February 28 @vitor Alright, I went over the file again: https://github.com/dnnsmnstrr/alfred-btt/releases/tag/1.0.3 Link to comment Share on other sites More sharing options...
vitor Posted February 28 Share Posted February 28 Thank you for the fast changes. This will be live later today at http://alfred.app/workflows/dnnsmnstrr/btt/. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now