Re: screensaver with password and different to default
Re: screensaver with password and different to default
- Subject: Re: screensaver with password and different to default
- From: Paul Skinner <email@hidden>
- Date: Mon, 20 Oct 2003 13:26:38 -0400
try this...
set modulename to quoted form of "Flurry"
set previousState to do shell script "defaults -currentHost read
com.apple.screensaver askForPassword "
do shell script "defaults -currentHost write com.apple.screensaver
askForPassword 1"
do shell script
"/System/Library/Frameworks/ScreenSaver.framework/Resources/
ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -module " &
modulename
do shell script "defaults -currentHost write com.apple.screensaver
askForPassword " & previousState
PS
On Monday, October 20, 2003, at 02:07 AM, Martin Meneses wrote:
Hi everybody,
I 'm using this script to run a screen saver different to default.
do shell script
"/System/Library/Frameworks/ScreenSaver.framework/Resources/
ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -module
MyScreenSaver &"
Now I would like to run the same script with password. I found this
script, but I don't know how to mix both
set previousState to SsaverPwordState({})
SsaverPwordState(1)
tell application "ScreenSaverEngine" to run
delay 5
SsaverPwordState(previousState)
on SsaverPwordState(parameter)
set {previousDelimiter, AppleScript's text item delimiters} to
{AppleScript's text item delimiters, ""}
set macAddress to (words 2 thru -1 of (do shell script "ifconfig en0
| grep ether")) as string
set preferenceFile to "" & POSIX path of (path to preferences as
string) & "ByHost/com.apple.screensaver." & macAddress
if parameter is not {} then
do shell script "defaults write " & preferenceFile & "
askForPassword " & parameter
end if
set PwordState to "defaults read " & preferenceFile & "
askForPassword "
set AppleScript's text item delimiters to previousDelimiter
return (do shell script PwordState) as integer
end SsaverPwordState
I appreciatte any help
Thanks
Martin
_______________________________________________
applescript-studio mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-studio
Do not post admin requests to the list. They will be ignored.
_______________________________________________
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.