Re: AppleScript under OS X
Re: AppleScript under OS X
- Subject: Re: AppleScript under OS X
- From: Nigel Garvey <email@hidden>
- Date: Thu, 12 Feb 2004 12:50:22 +0000
Mark Gibson wrote on Thu, 12 Feb 2004 09:17:08 +1100:
>
Machines at one of my sites running OS 9 used to
>
run the following startup script:
[script snipped]
>
This would delete the contents of the Templates
>
folder and copy over fresh files from the Master
>
on the server and then launch Word.
>
>
Under OS X, I've tried to record a script but the
>
"copy" and "delete" actions don't seem to be in
>
the Finder's dictionary anymore. Running "record"
>
and following the above sequence, all I get is:
>
>
tell application "Finder"
>
activate
>
make new Finder window to startup disk
>
make new Finder window to folder "Applications" of startup disk
>
make new Finder window to folder "Microsoft
>
Office X" of folder "Applications" of startup disk
>
make new Finder window to disk "DATA"
>
make new Finder window to folder "Server II" of disk "DATA"
>
end tell
>
>
Any idea as to how I can replicate the functionality of the original script?
Hi, Mark.
If your original script had been written from scratch instead of being
recorded, it might have turned out something like this:
delay 20
set MSOfficeFolder to alias ((path to At Ease applications folder as
string) & "Microsoft Office 2001:")
tell application "Finder"
activate
delete every item of folder "Templates" of MSOfficeFolder
duplicate every item of folder "
DATA:Server II:Templates:" to folder
"Templates" of MSOfficeFolder
empty trash
open file "Microsoft Word" of MSOfficeFolder
end tell
I'm not familiar with Office and you don't say where the X version keeps
its Templates folder, but your script recorded in X seems to suggest that
it's similarly located in the Office folder in the Applications folder.
If that's the case, then the above "scratch" script might also work in X
after you change the Office folder name in the second line.
NG
_______________________________________________
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.