• 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: Pref. pane (need more help)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pref. pane (need more help)


  • Subject: Re: Pref. pane (need more help)
  • From: Bernard Azancot <email@hidden>
  • Date: Fri, 25 Mar 2005 20:46:09 +0100


Le 24 mars 05, à 15:13, Robert Poland a écrit :

Someone here sent me the following code.
I need to set the screen brightness from the minimum to the maximum (slider pushed from the left to the right).
The script opens the screen pref. pane and stops.
Any suggestion, would be appreciated.


Thanks in advance.
Bernard

-- Script --
set bValue to 0.8
tell application "System Preferences"
	activate
	set current pane to pane "com.apple.preference.displays"
end tell
tell application "System Events" to tell process "System Preferences"

tell radio button "Display" of tab group 1 of window 1 to if value is 0 then
repeat until value is 1
click
end repeat
end if


tell slider 1 of group 2 of tab group 1 of window 1 to set value to bValue
end tell
tell application "System Preferences" to quit
-- End of script --

Since I know the code I sent you works, with OS 10.3.x. I can only assume that you have never enabled the "System Events".


That is done in the System Preference "Universal Access" pane. Be sure that the checkbox "Enable access for assistive devices" has been checked.

The advice "setting 0.8" is correct set to 1.0 for maximum brightness.

Although "tell radio button 1 of tab group 1... " is more universal my command "tell radio button "Display" of tab group 1..." is easier to read.

Feel free to contact me if there is still a problem.

HTH,

--
Bob Poland - Fort Collins, CO
http://www.ibrb.org/

Thanks a lot Bob. Unfortunately the problem is still there. I do not have radio buttons but a slider... The checkbox "Enable access for assistive devices" has been checked. Any idea.

Regards.
Bernard


_______________________________________________ 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: 
 >Pref. pane (need more help) (From: Bernard Azancot <email@hidden>)

  • Prev by Date: Re: getting chunks of text
  • Next by Date: Re: Word wordcounts
  • Previous by thread: Re: Pref. pane (need more help)
  • Next by thread: Re: Pref. pane (solved)
  • Index(es):
    • Date
    • Thread