Re: Folder Attachment
Re: Folder Attachment
- Subject: Re: Folder Attachment
- From: John Delacour <email@hidden>
- Date: Wed, 20 Nov 2002 21:21:44 +0000
- Mac-eudora-version: 5.3a9
At 4:18 pm -0600 19/11/02, Amir Bozorgzadeh wrote:
>
I am trying to get an applescript to attach to a folder on startup
>
and having really been fighting it on OSX. Recently someone on the
>
list gave me a idea on how to have a script delete a file from a home
>
directory on an NT server using AD authentication. The users home
>
folder is different depending on who logs in so I needed a variable
>
path to get to it. The path was "(path to current user home folder)"
>
Now I need to attach my script to the home directory folder and
>
cannot get it to work.
"(path to current user home folder)" means nothing.
(path to current user home folder) or (path to "cusr") will do.
(path to "fasf") is where your scripts must be.
set folder_ to "" & (path to "cusr")
set script_ to "add - new item alert.scpt"
tell application "System Events"
-- in case it's already attached, to avoid an error...
remove action from folder_ using action name script_
attach action to folder_ using script_
-- check result
set scripts_ to attached scripts (path to "cusr")
tell me to display dialog "" default answer "" & scripts_
--dx:Users:jd:Library:Scripts:Folder Action Scripts:add - new item alert.scpt
end tell
Use the EVENT LOG from the Controls menu in Script Editor to see where you're going wrong. If more people would do this, there would be less traffic on the list. Be your own nanny first.
JD
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.