Re: lock the screen from the keyboard, win a prize
Re: lock the screen from the keyboard, win a prize
- Subject: Re: lock the screen from the keyboard, win a prize
- From: Nigel Smith <email@hidden>
- Date: Fri, 22 Nov 2002 13:34:59 +0000
On 22/11/02 10:35 am, "Charles Arthur" <email@hidden> wrote:
>
On Thu, 21 Nov 2002 23:09:14 -0600, Matthew Stuckwisch <email@hidden>
>
>
I wrote..
>
>> noticed on OSFAQ: (specifically at
>
>> http://www.osxfaq.com/dailytips/11-2002/11-20.ws)
>
..
>
>> *Please* note that the "me" is not *me* me but a "someone else" me -
>
>> specifically Bob LeVitus at OSXFAQ (mailto:email@hidden).
>
>
> Not willing to test right now since I have a few important docs open,
>
> I'm sure you could create a list of all running processes (using a form
>
> of shell script "top"), and then kill all visible ones.....
>
>
I think he was looking for something less radical - just
>
password-protecting the screen,
So something like this, saved as an application and made available from the
a function key. Note you'll have to change the first three lines to suit the
HD name and MAC address of your machine, and your username (hey, I was in a
hurry!):
__________________
set theDisk to "hardDiskName"
set theUser to "username"
set theMacAddress to "computersMacAddress"
set prefsFile to theDisk & ":Users:" & theUser &
":Library:Preferences:ByHost:com.apple.screensaver." & <<break>>
theMacAddress & ".plist"
set fileRef to (open for access alias prefsFile with write permission)
set thePrefs to read fileRef
set {oldTIDs, AppleScript's text item delimiters} to <<break>>
{AppleScript's text item delimiters, return}
set thePrefs to "" & paragraphs 1 thru 5 of thePrefs & return <<break>>
& " <integer>1</integer>" & return & paragraphs <<break>>
7 thru -1 of thePrefs
set eof of fileRef to 0
write thePrefs to fileRef
close access fileRef
ignoring application responses
tell application "ScreenSaverEngine"
run
end tell
end ignoring
delay 5
set fileRef to (open for access alias prefsFile with write permission)
set thePrefs to read fileRef
set thePrefs to "" & paragraphs 1 thru 5 of thePrefs & return <<break>>
& " <integer>0</integer>" & return & paragraphs <<break>>
7 thru -1 of thePrefs
set eof of fileRef to 0
write thePrefs to fileRef
close access fileRef
set AppleScript's text item delimiters to oldTIDs
___________________
Bring on the improvements!
Nigel
_______________________________________________
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.