Can’t make application "Automator" into type integer... can you help?

Joined
Jul 17, 2012
Messages
1
Reaction score
0
I am having difficulty with a simple script. This script is part of a slightly larger project that is intended to overcome the deficiencies of my scanner by reversing and then merging one pdf with another. This should allow me to use the scanner's fax feeder to scan double sided, saving me a lot of time at work.

At this point in the script, I have reversed, merged and deleted one pair and produced a merged version in an output folder. From what is left in my input folder, I would like to create a script that will rename the first two items "1.pdf" and "2.pdf" so that they can be fed back into the workflow.

So far, I have this:

Get specified finder items (returns input folder)
pass result to
Run Applescript

on run {input, parameters}

tell application "Finder"
set thisList to files of folder input
sort thisList by name
item one of result
end tell

end run
pass result to
name single item (1)
(As similar script changes the second item to 2.pdf)

I think this should work. However, when I run the script I get the error message in the AppleScript. (It highlights "files" from line 4)

Syntax Errror: Finder got an error: Can’t make application "Automator" into type integer

Can anyone help me with this? I am very new to Automator/Applescript. I have looked around on this webpage for an answer but have been unable to find one that I understand.

Thank you in advance.
 

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