• 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: Can't turn off screen savers in System Preferences
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't turn off screen savers in System Preferences


  • Subject: Re: Can't turn off screen savers in System Preferences
  • From: Bill Cheeseman <email@hidden>
  • Date: Sun, 08 Oct 2006 07:49:38 -0400
  • Thread-topic: Can't turn off screen savers in System Preferences

on 2006-10-07 6:53 PM, Philip Aker at email@hidden wrote:

> So if anyone knows how to click that sucker (oops, I mean slider),
> speak up.

Sadly, the slider does not change, either visually or actually, in response
to the 'click at' command.

First, let me say that the 'click at' script generated by UI Browser 1.4.1
is invalid. I have fixed it in UI Browser 2.0, which is not yet ready for
release.

Here's a simplified 'click at' script to set the slider to approximately 3
minutes. The script assumes that System Preferences is already opened to the
Desktop & Screen Saver pane.

activate application "System Preferences"
tell application "System Events"
    tell process "System Preferences"
        try
            tell slider 1 of group 1 of tab group 1 of window 1
                set {xPosition, yPosition} to position
                set {xSize, ySize} to size
            end tell
            set clickX to xPosition + 10
            set clickY to yPosition + (ySize div 2)
            click at {clickX, clickY}
            activate
            display dialog "Position and Size: {{" & xPosition & ", " &
yPosition & "}, {" & xSize & ", " & ySize & "}}" & return & "Click at: {" &
clickX & ", " & clickY & "}"
        end try
    end tell
end tell

You'll see the thumb flash, indicating that the slider received the click,
but it doesn't move. And, just to make sure, if you quit System Preferences
and reopen it, you'll see that the value has not changed.

As a reality check, here's a 'click at' script that successfully opens the
Hot Corners sheet by clicking in the center of the Hot Corners button.

activate application "System Preferences"
tell application "System Events"
    tell process "System Preferences"
        try
            tell button 4 of group 1 of tab group 1 of window 1
                set {xPosition, yPosition} to position
                set {xSize, ySize} to size
            end tell
            set clickX to xPosition + (xSize div 2)
            set clickY to yPosition + (ySize div 2)
            click at {clickX, clickY}
            activate
            display dialog "Position and Size: {{" & xPosition & ", " &
yPosition & "}, {" & xSize & ", " & ySize & "}}" & return & "Click at: {" &
clickX & ", " & clickY & "}"
        end try
    end tell
end tell

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Can't turn off screen savers in System Preferences (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: Can't turn off screen savers in System Preferences
  • Next by Date: Re: Can't turn off screen savers in System Preferences
  • Previous by thread: Re: Can't turn off screen savers in System Preferences
  • Next by thread: Re: Can't turn off screen savers in System Preferences
  • Index(es):
    • Date
    • Thread