• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: lock the screen from the keyboard, win a prize
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lock the screen from the keyboard, win a prize


  • Subject: Re: lock the screen from the keyboard, win a prize
  • From: John Delacour <email@hidden>
  • Date: Tue, 26 Nov 2002 13:07:44 +0000
  • Mac-eudora-version: 5.3a9

At 7:34 pm -0500 25/11/02, Paul Skinner wrote:

On Monday, November 25, 2002, at 05:01 PM, Philip Aker wrote:

do shell script "defaults -currentHost write com.apple.screensaver askForPassword -integer " & val
Excellent!

Unixy goodness. mmmm...

set previousState to do shell script "defaults -currentHost read com.apple.screensaver askForPassword "
do shell script "defaults -currentHost write com.apple.screensaver askForPassword 1"
tell application "ScreenSaverEngine" to run
do shell script "defaults -currentHost write com.apple.screensaver askForPassword -" & previousState

I love it when a thread works out. It's hard to imagine where this is all going to be in a year. So much to learn.

Yes indeed!

On my machine I still need the delay, and in order to avoid a dialog I use
open -a in the shell rather than tell app... This can also be appended to the previous command.

set s to " com.apple.screensaver askForPassword "
set val to do shell script "defaults -currentHost read " & s
do shell script "defaults -currentHost write " & s & "1
;open -a ScreenSaverEngine"
delay 5
do shell script "defaults -currentHost write " & s & val

This ability to write easily to plist files means we can probably get the functionality of one of the old osaxim (Donald's commands ???), namely to set the default path for open dialogs etc., which Frontier and OneClick always had but which was always a pain in AppleScript.


At 9:40 pm -0500 25/11/02, Paul Skinner wrote:
Has anyone else lost the ability to run a text selection as script using CompileAndExecute service since they upgraded to Jaguar?

Can you give an example to show what you mean?

JD
_______________________________________________
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.

  • Follow-Ups:
    • Changing Get File dialog path
      • From: John Delacour <email@hidden>
    • Re: lock the screen from the keyboard, win a prize
      • From: Paul Skinner <email@hidden>
    • Re: lock the screen from the keyboard, win a prize
      • From: Philip Aker <email@hidden>
References: 
 >Re: lock the screen from the keyboard, win a prize (From: Paul Skinner <email@hidden>)

  • Prev by Date: new knowledgebase scripts for QuickTime
  • Next by Date: Shell script(?) overview for dummies
  • Previous by thread: Re: lock the screen from the keyboard, win a prize
  • Next by thread: Re: lock the screen from the keyboard, win a prize
  • Index(es):
    • Date
    • Thread