Re: scripting web sharing control panel
Re: scripting web sharing control panel
- Subject: Re: scripting web sharing control panel
- From: email@hidden
- Date: Wed, 7 Feb 2001 00:42:07 EST
In a message dated 2/6/01 5:51:53 PM, Zac Mutrux wrote:
>
I would like to write a simple script to change the source folder of the Web
>
Sharing control panel. I can't seem to find any documentation about
>
scripting this particular control panel, however. Is it possible?
The Web Sharing control panel has essentially zero scriptability. However,
the source folder is saved as a simple alias in the "Web Sharing Folder"
inside the preferences folder. This can be changed using standard Finder
scripting
set newSharedFolder to "HD:folder1:folder2"
tell application "Finder"
-- delete or rename the current "Web Sharing Root Folder" alias
make alias to folder newSharedFolder at folder (((path to preferences
folder) as string) & "Web Sharing Folder") with properties {name:"Web Sharing
Root Folder"}
end tell
You will probably have to stop and start Web Sharing for this to take effect,
and I don't know how to accomplish that by Applescript (but QuicKeys or the
like may be capable), and there is no way (short of trying to change the
preferences file directly - yikes!) to set the index file by Applescript.
However, the file will be browser accessible via the full URL.
Jeff Baumann
email@hidden
www.linkedresources.com
"Cool! An Applescript that lives my life for me. I'm going to bed now."