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.
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.