Slight deviation, big problem with script
Slight deviation, big problem with script
- Subject: Slight deviation, big problem with script
- From: Jeffrey Madson <email@hidden>
- Date: Mon, 23 May 2011 10:56:27 -0500
I have attached a script below that works great and has been used extensively. Instead of installing the RRDAuto folder into the Utilities folder I want to install it into a folder called "Options" at the top level of the hard drive now. The "Options folder may or may not already exist when this is run.
In the first line I took out the word utilities and put in Options folder which creates an error. I also changed the set folderpath to line to: set folderpath to (("Options")) as text) & "RRDAuto" but the script never gets that far.
Any suggestions on how to get this script corrected would be greatly appreciated.
-- create RRDAuto folder
set x to path to utilities folder
set y to x & "RRDAuto" as string
tell application "Finder"
if exists y then
else
set y to make new folder at x with properties {name:"RRDAuto"}
my Set_Icon()
end if
end tell
on Set_Icon()
-- path to the ionicelf tool
set ionicelftoolpath to (("var:scripts:") as text) & "ionicelf"
set ionicelftoolpath to quoted form of POSIX path of ionicelftoolpath
-- the image that should be used as the folder icon
set imagefilepath to (("var:scripts:") as text) & "RRDAuto.png"
set imagefilepath to quoted form of POSIX path of imagefilepath
-- the folder which should get an icon
set folderpath to (("Applications:Utilities:") as text) & "RRDAuto"
set folderpath to quoted form of POSIX path of folderpath
-- applying the icon to the folder
set command to ionicelftoolpath & " -img " & imagefilepath & " -file " & folderpath
do shell script command
end Set_Icon
__________________________________________________________________________________
Jeffrey Madson | Macintosh Desktop Engineer | RR Donnelley
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden