Folder Attachment
Folder Attachment
- Subject: Folder Attachment
- From: Amir Bozorgzadeh <email@hidden>
- Date: Tue, 19 Nov 2002 16:18:30 -0600
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. The script is as follows and I keep either
getting error or it really doesn't do it (just gives the appearance).
tell application "System Events" to attach action to
("Microsoft:Preferences:Library:(path to current user folder)") using
("WORDDelete")
Is this a shortfall of System Events because it seems to work fine
when I put in a defined path.
I also got an email on how to setup something similar in Word on
AutoExit using a Macro but I also cannot figure out how to put in a
variable path there:
Sub DeletePrefs()
MacScript ("set filePath to ((path to preferences as string) &
""Microsoft:Office Registration Cache X"")" & vbCr & _ ' one line
" tell application ""Finder""" & vbCr & _
" delete file filePath" & vbCr & _
" empty trash" & vbCr & _
" end tell")
End Sub
What do I use in the "path to preferences string" to make a variable
path. Anybody that can help with either would be appreciated. I am
not familiar at all with VB but I am so close I can taste it. Thanks
for any help. Either route would work for my purpose.
--
__________________________________________________
Amir Bozorgzadeh
ITS - DSG
5 Lindquist Center
University of Iowa
319-335-5480
_______________________________________________
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.