Hi all,
I’m in the middle of writing a small utility appliation for my office, and I’m writing the first bit of script I’ve ever scripted that interacts with the Finder. As I’ve been doing the whole way through building the app, I tested a small piece of code in Script Editor, that worked perfectly …
tell application "Finder"
if folder ("Macintosh HD:Users:Peter:Desktop:" & "TestFolder") exists then
delete folder "Macintosh HD:Users:Peter:Desktop:TestFolder"
end if
set FirstFolder to make new folder at "Macintosh HD:Users:Peter:Desktop:" with properties {name:"TestFolder"}
end tell
… but when I cut and paste that very same code into Applescript Studio, I get a syntax error whenever I try to save or run the app. It’s usually along the lines of "Expected “then”, etc. but found “(”. depending on how I try and tweak the code.
Is there someting I haven’t spotted that could be wrong? And why would a bit of Script Editor code not work in Applescript Studio?
Thanks for all your help.
Peter
Model: Mac mini G4
AppleScript: 1.10.7
Browser: Safari 419.3
Operating System: Mac OS X (10.4)