I've recorded some actions and made an Automator workflow out of it. It's basically some clicks, selecting something in drop-down menues and quitting the app. I run the workflow at 10x speed, but it's still fairly slow. Is there a way to speed it up beyond 10x? It can also run in the background, invisibly, I don't need to see the steps. I don't know if it's possible.
Try this alternative approach in Automator. Be sure to back up any PDFs before applying this workflow – the originals will be overwritten.
In Automator.app, create a new workflow and add the following actions:
- Ask for Finder Items, with Allow Multiple Selection
- Apply Quartz Filter to PDF Documents, selecting the Reduce File Size option
When run this workflow will let you select multiple PDFs and then overwrite those files with reduced file size versions. It performs the equivalent steps as the original workflow, but is faster than scripting Preview.app.
Drag the steps from inside the watch-me-do into the main workflow. This will turn each step into a little Applescript that you can edit. It uses a different means of clicking menu items that don't involve actually moving the cursor. There's also a delay in the code that you can edit. Note however that since it's a different means of clicking menu items, you may need to test it to make sure everything still works as intended. I've had to increase delays to overcome things like waiting for an app to "activate". And some watch-me-do actions may not be able to be dragged into the workflow and turned into Applescripts.