xilopaint / alfred-things

Interact with Things using Alfred.
MIT License
367 stars 17 forks source link

Support for Things 3 Beta? #24

Closed kennonb closed 1 year ago

kennonb commented 1 year ago

Hi! Thanks for this plugin. I was toying around with supporting the beta of Things 3, but wasn't sure the best method for adding this. Is this something you've considered and would be open to a PR if I figure something out, or did you already have an idea here? Or would you rather not add that complexity? ๐Ÿ˜„

xilopaint commented 1 year ago

I don't have the beta installed. Does the workflow not work with it?

kennonb commented 1 year ago

No unfortunately the app identifier in AppleScript is different between production & beta:

com.culturedcode.ThingsMac vs com.culturedcode.ThingsMac.beta

I've tried to find an elegant way to accomplish swapping between these variables but it doesn't appear to be possible with AppleScript, so I think I'm going to abandon it at the moment. ๐Ÿ˜Š I can just swap to the production build anyway.

xilopaint commented 1 year ago

How is the beta named in the Applications folder?

kennonb commented 1 year ago

It's named "ThingsรŸ" by default. But I've renamed it to "Things" and it doesn't affect what's used in AppleScript. Although I guess you could call the app using the name instead of the identifier?

kennonb commented 1 year ago

Ok, so I've confirmed changing the tell from:

tell application id "com.culturedcode.ThingsMac" โ†’ tell application "Things"

works when I rename the beta app to "Things.app" in the Finder. This might be the easiest solution to allow it to work between versions?

xilopaint commented 1 year ago

This might be the easiest solution to allow it to work between versions?

I think so, but recommending users to rename the beta app is not something I would like to implement as a solution to the issue, although it's still a workaround available for coders and power users.