First off I am a newbie at this so, bear with me please.
I created this script to launch Adobe Professional and somewhere the logic is wrong and I can’t see what it is. Can anyone help?
Here is the script:
property targetFolder : "Mac HD:FolderX"
on adding folder items to this_folder after receiving added_items
repeat with theFile in added_items
if (name of file ends with "pdf") then
tell application "Adobe Acrobat 7.0 Professional"
set theDocument to open theFile
save theDocument to targetFolder & (word 1 of name of theFile) & ".eps" using EPS Conversion
end tell
else
tell application "Finder" to delete theFile
end if
end repeat
end adding folder items to
¢ your index variable of the loop is theFile, but you’re using file, which is a reserved word
¢ only the Finder, System Events and info for know the name of a file, AppleScript itself doesn’t
¢ the folder path in the property line must end with a colon
try this
property targetFolder : "Mac HD:FolderX:"
on adding folder items to this_folder after receiving added_items
repeat with theFile in added_items
set {name:Nm, name extension:Ex} to info for theFile
if Ex is "pdf" then
tell application "Adobe Acrobat 7.0 Professional"
set theDocument to open theFile
save theDocument to targetFolder & (word 1 of Nm) & ".eps" using EPS Conversion
end tell
else
tell application "Finder" to delete theFile
end if
end repeat
end adding folder items to