Mystery in my Automator Script


lanceloz

New Member
Joined
May 18, 2018
Messages
2
Reaction score
0
Hi,

I created a script which works as follow : after I select a few PDF files in the finder, Automator combines these into a single PDF document and opens it in Preview. From there I take the control back and rename the combined document with a name i like and save it.

My script works fine in Automator, it consists of:
- Get Selected Finder Items
- Combine PDF Pages
- Open Finder Items (with Default Application)

When testing the above script within Automator, I get exactly what I want. Suppose I apply it on two PDF files (A and B), Automator produces a single PDF file with two pages (A - B). That's what i want.

However, and here is the mystery, when I run this very script from the Finder after having selected the same two files, Automator produces a single PDF file with four pages (!) instead of A - B, I get A - B - A - B.

So I need to delete a pair of A - B to get back to the intended result, which is a two-page document (not a four).

Any idea of why this is happening? or any way to fix it?

Thanks,
Lance
 

Attachments

Ad

Advertisements

Cory Cooper

Moderator
Joined
May 19, 2004
Messages
7,456
Reaction score
265
Hello and welcome.

This is a much easier Automator Service workflow:



See if that works better for you.

C
 

lanceloz

New Member
Joined
May 18, 2018
Messages
2
Reaction score
0
Thanks Cory Cooper. You are right it is a much easier script and I realised what was wrong in mine thanks to yours. It was the "Get Selected Finder Items" which I was supposed to remove before to run the workflow outside of automator. The fact I did leave it was "duplicating" the files to combine hence the A-B-A-B instead of A-B. Many thanks!
 
Ad

Advertisements

Cory Cooper

Moderator
Joined
May 19, 2004
Messages
7,456
Reaction score
265
Excellent...glad it worked for you. Thanks for explaining what the issue was in the original workflow, so that others may benefit in the future.

C
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top