knurling / ServiceStation

Service Station
39 stars 1 forks source link

"The application “Pages” cannot open the specified document or URL." #53

Open careinoh opened 3 years ago

careinoh commented 3 years ago

Hi, new to github, not tech savvy, tried to read through other open and closed issues for this but had a hard time understanding. If this is already posted, please let me know and I'll check out the other ticket.

When right clicking on either the desktop or on a folder and selecting the new menu item I added.... I get the message "The application “Pages” cannot open the specified document or URL."

Please explain in layman's terms/steps, appreciate it!

Screen Shot 2021-01-07 at 2 01 36 PM Screen Shot 2021-01-07 at 2 02 04 PM
pkamb commented 3 years ago

The issue here is that the app Pages cannot open a Folder.

If you try to drag a Folder to the Pages icon in your Dock, you'll see the same thing: no ability to open that Folder. Other apps are able to open Folders, and thus work in Service Station as well.

Are you just testing things out, or is there a reason you're trying to open a Folder with Pages?

It's interesting.... I can understand thinking that right-clicking the Desktop background, then selecting Pages, would be an easy way to open the app. The app currently doesn't work like that... it tries to open the Folder Desktop with the app Pages; it's not just a shortcut to open the app.

If you do want such "shortcut to open the app" functionality, it could currently be scripted via Apple Script or similar.

I'll consider adding this shortcut functionality for apps that are not able to open a Folder.

careinoh commented 3 years ago

I see, so Service Station is used to open up Folders, Images, or Text with applications that already support them and adding those shortcuts to the right click menu. Eg. Right clicking on an Image and instead of going Open With > Preview (or other listed defaults), I can create direct menu items to list Photoshop, Illustrator etc. to open up an image with Service Station.

I thought it was used to customize the right click menu, with options being shortcuts to launch applications. I want to easily open up Pages all the time to make quick notes.

I have no idea about AppleScript. I'm currently working around it by using Automator but I can't right click anywhere to see the new menu options, I have to right click on a file/folder to get the option which isn't as convenient.

Also loved that Service Station had the new menu options near the top with icons rather than with Automator, the menu option is hidden under Quick Actions or Services or listed at the very bottom, but that's too bad Service Station isn't used for what I was looking for.

Thanks for clarifying!

pkamb commented 3 years ago

@careinoh Service Station can launch Automator Workflows too, so your existing Workflow should work after a small modification.

In Automator just select File > New > Workflow rather than Service or Quick Action. Service Station can open those workflows.

If you copy/paste your actions out of a Service / Quick Action you've created in Automator and into a non-Service Automator Workflow it should work the same when run by Service Station.

In Service Station, click the System Setup > Scripts > Sample Scripts button to see an example Automator file that can be launched by Service Station.

Jason Snell wrote about the same process here:

https://sixcolors.com/post/2020/04/service-station-adds-control-over-finder-menus/

It took me a little while to figure out how to adapt my homebrewed automations for use with Service Station. My complex Automator actions that had been saved as Services needed to be re-saved as standard Automator Workflows, but then worked unmodified. Because Automator is the only approved way to build a Quick Action, a bunch of mine were actually just AppleScripts or shell scripts wrapped in a single Automator “do script” block. I pulled that code back out of Automator, made a couple of small changes, saved it in Service Station’s scripts folder, and everything worked just fine.

Let me know if that works for you!