Closed nikitavoloboev closed 7 years ago
Hi Nikita, This is a good idea; doing it this way would keep you at the context level you've already entered via Alfred. Ulysses has no apple scripting or callback support for the mac version. If you want to tinker with the workflow's interaction with Ulysses its not too involved.
I just tried getting Alfred to send a cmd-2 after opening the sheet or group. At first glance it works great, but actually Ulysses has an odd system in that this command toggles between which-ever view you had selected and 'sheets view' (cmd-2). I can't see a way around this except to read the state of a menu command (i.e. where the check mark is). This seems only to be possible if your global accessibility commands are switched on (http://stackoverflow.com/questions/69030/in-applescript-how-can-i-find-out-if-a-menu-item-is-selected-focused);not sure I'm keen to pursue this route though.
If you can work out series of manual interactions with Ulysses that always selects what we want, then I'd be pleased to add it to the workflow. I can't see one though.
--Rob
Hey @robwalton I didn't quite manage to get it working still.
I really wish for it to open only on the writing and not have the sidebar there. Perhaps something changed in Ulysses API that we can do?
Thank you.
Hi @nikitavoloboev I'd been away from this for a while. Glad to hear you are still interested. Was looking the other day and there is indeed a new API in Ulysses 2.7. The x-callback url scheme they use on iOS is now available in macOS: https://ulyssesapp.com/kb/x-callback-url/ . For example:
`ulysses://x-callback-url/open?id=G4g3rGj2SsAEfKQSAvtwWw`
opens a sheet based on an id. There are two issues though:
I'll email their support about both issues as I'd quite like this to work too.
I added a feature to check and then toggle the view state from the menu bar if necessary. Instructions in u:help. This requires Alfred to have assistance services on (but will prompt if it isn't). I hesitated with this solution as its a bit of a security hole---but no worse I imagine than having workflows with arbitrary shell commands. Definitely a good feature.
This is amazing. Thank you. :)
It is much nicer this way; thanks for bugging me to do it! Did you get the v0.9.2 which fixed a race condition when Ulysses opening? Also, master now has a proper find command. Will trial it a bit before releasing this time though!
I really wish we could instantly go to a certain state in Ulysses like cmd + 2 or cmd + 3. It would especially be useful when searching for sheets. It's so annoying, opening a sheet and then seeing the lengthy animation come through just so you can go on and start writing. 😞
from opening to this view (current implementation) :
to this :
Thank you.