| Weblog: | Homebrew Safari [Updated] | |
| Subject: | AppleScript | |
| Date: | 2005-08-24 05:28:50 | |
| From: | F.J. | |
|
Response to: Applescript
|
||
|
Hi!
|
||
Showing messages 1 through 2 of 2.
-
AppleScript
2005-08-24 06:16:11 xyz3 [Reply | View]
-
AppleScript
2005-08-24 06:22:03 FJ de Kermadec |
[Reply | View]
Hi!
Feedback and comments are always most welcome! Thank you very much for taking the time to suggest these options.
I have played quite a bit with integrating UNIX and AppleScript before all the new fancy commands appeared and I shamefully confess I need to brush up on them — so a double thanks for pointing them out.
As you can see, the script is prepared for more advanced error detection as well but I haven't implemented that yet.
FJ
| Showing messages 1 through 2 of 2. |




If you plan to use rm -rf I suggest using the quoted form command to quote the path:
Example:
set myUserName to (do shell script "whoami")
do shell script "rm -r " & (quoted form of ("/Users/" & myUserName & "/Library/Cookies/" as string))
The shell script line ends up looking something like this: "rm -r '/Users/adminx/Library/Cookies/'"
Also the file at /System/Library/ScriptingAdditions/StandardAdditions.osax has more than a few useful commands you might want to check out.
EX: set myUserName to short user name of (system info)
This is not to say I am condoning using the unix layer, but merely pointing out another way, and other options.
Have fun-