| Weblog: |
|
Homebrew Safari [Updated]
|
| Subject: |
|
AppleScript |
| Date: |
|
2005-08-24 05:28:50 |
| From: |
|
F.J.
|
Response to: Applescript
|
|
Hi!
Thank you for your reply!
Yes, I am most definitely willing to share the script should anyone find it of interest. The reason I did not from the start is that it plays with "rm" commands and, therefore, could be dangerous should anything go wrong.
I'll edit this entry and add it.
FJ
|
Showing messages 1 through 2 of 2.
-
AppleScript
2005-08-24 06:16:11
xyz3
[View]
|
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-