Dangerous script!
I was playing around with scripting Script Editor and ran the following "innocuous" looking script. Take a look:
set myTest to "tell application " & quote & "finder" & quote & return & "beep" & return & "end tell"
tell application "Script Editor"
make new document with properties {name:"Finder beep", contents:myTest, description:"Just beeps the Finder"}
compile document "Finder beep"
save document "Finder beep" as "application" in "OS X:Users:vince's stuff:desktop:" with run only
quit saving no -- or "yes" or "ask"
end tell
Doesn't look like it can wreak too much havoc, does it? Alas, it does.
If you use file path above without the name of the file (OS X:Users:vangelon:desktop:), the file will replace the desktop folder and everything will be gone!!! You must specify the name of the file after the desktop folder or your desktop folder will be replaced!!!
This will occur WITHOUT a "File already exists" warning dialog!!! Luckily I have strong backup instincts so this was a simple restore of the desktop folder. I'm really glad I didn't save to the top level of the Hard Disk!
🙂
Vince
set myTest to "tell application " & quote & "finder" & quote & return & "beep" & return & "end tell"
tell application "Script Editor"
make new document with properties {name:"Finder beep", contents:myTest, description:"Just beeps the Finder"}
compile document "Finder beep"
save document "Finder beep" as "application" in "OS X:Users:vince's stuff:desktop:" with run only
quit saving no -- or "yes" or "ask"
end tell
Doesn't look like it can wreak too much havoc, does it? Alas, it does.
If you use file path above without the name of the file (OS X:Users:vangelon:desktop:), the file will replace the desktop folder and everything will be gone!!! You must specify the name of the file after the desktop folder or your desktop folder will be replaced!!!
This will occur WITHOUT a "File already exists" warning dialog!!! Luckily I have strong backup instincts so this was a simple restore of the desktop folder. I'm really glad I didn't save to the top level of the Hard Disk!
🙂
Vince