Answering my own question, here is a simple “Get Address” script to get started on the path of using trello, using the same structure @Heikau used in his “Forklift” script.
It’s ugly UI Scripting, but it works.
activate application "Trello" tell application "System Events" tell process "Trello" set the clipboard to "" delay 0.3 click menu item "Copy Current URL" of menu 1 of menu bar item "Edit" of menu bar 1 delay 0.3 set theURL to the clipboard end tell end tell return theURL
This returns a URL, though, so it won’t be opened in the Trello App but in a browser.
Obvious improvements would be to :
- get the name of the card
- open the link in trello.app
There is a trello API that could theoretically be used for this, because you can reference the card from a short link that’s embedded in the card url. I’d need to practice my regex game in applescript, then call the API. Not sure I have the time and/or the chops …