here is my script, it stops at “save front document”. Its says I dont have permission. Any ideas.
set the save_location to "/Users/shawnbrady/Desktop/TL/png/"
tell application "Finder"
set the_files to files of folder "Macintosh HD:Users:shawnbrady:Desktop:TL:"
end tell
repeat with a_file in the_files
tell application "Preview"
activate
open a_file
delay 1
try
save front document in POSIX file save_location
end try
end tell
delay 1
end repeat
set the save_location to "/Users/shawnbrady/Desktop/TL/png/"
tell application "Finder"
set the_files to files of folder "Macintosh HD:Users:shawnbrady:Desktop:TL:"
end tell
repeat with a_file in the_files
tell application "Finder"
set newFileName to name of a_file
set newFilePath to save_location & newFileName & ".png"
end tell
tell application "Preview"
activate
open a_file
delay 1
try
save front document in POSIX file newFilePath
end try
end tell
delay 1
end repeat