Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Screen black out, dim & restore via applescripts
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
*  
View profile  
 More options Aug 28 2010, 8:47 pm
From: "*" <ra...@rabyn.com>
Date: Sat, 28 Aug 2010 19:47:44 -0500
Local: Sat, Aug 28 2010 8:47 pm
Subject: [QLab] Screen black out, dim & restore via applescripts
Greetings,

I'm using the scripts below to control the brightness level of the control
monitor for a 2 monitor rig. 1 - control / 1 - video

The script functions as desired but it also opens up the system preference
window for displays but then leaves it open.

I would assume the window HAS to be opened to make the adjustment but so
far I can't figure out how to have the "pane" close before the script is
closed.

I'm assuming that this line,

tell application "System Preferences" to reveal anchor
"displaysDisplayTab" of pane "com.apple.preference.displays"

should be easily "unrevealed" but so far nothing I try works & I can't
find the opposite command yet.

---------------------------------------------------------------------------

to turn the brightness of the screen down to 0 / off:

tell application "System Events"
        tell application "System Preferences" to reveal anchor
"displaysDisplayTab" of pane "com.apple.preference.displays"
        tell process "System Preferences"
                set value of slider 1 of group 2 of tab group 1 of window 1 to 0
        end tell
end tell

to turn the brightness of the screen up to full:

tell application "System Events"
        tell application "System Preferences" to reveal anchor
"displaysDisplayTab" of pane "com.apple.preference.displays"
        tell process "System Preferences"
                set value of slider 1 of group 2 of tab group 1 of window 1 to 1
        end tell
end tell

NOTE - the only difference between the two scripts is the last number
which is either 0 or 1. You can also specify a number between 0 & 1. For
example, .5 = 1/2 brightness & so on.

If you use these, make sure you disable "Automatically adjust brightness
as ambient light changes or else your mid bright levels well be
overridden.

I would guess although I don't have a second monitor that if there is more
than 1 monitor, the same scripts could be modified to control those as
well but maybe not. Maybe this is only useful for an on board mac screen
such as those found on Imac & Macbook products.

FYI- these script worked fine via the applescript editor but not in Qlab
until I followed the instructions here:

http://figure53.com/wiki/index.php?title=QLab_Scripts_and_Macros#Usin...

Best Regards,

*

________________________________________________________
WHEN REPLYING, PLEASE QUOTE ONLY WHAT YOU NEED. Thanks!
Change your preferences or unsubscribe here:
http://lists.figure53.com/listinfo.cgi/qlab-figure53.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rich Walsh  
View profile  
 More options Aug 28 2010, 9:05 pm
From: Rich Walsh <richwa...@mac.com>
Date: Sun, 29 Aug 2010 02:05:08 +0100
Local: Sat, Aug 28 2010 9:05 pm
Subject: Re: [QLab] Screen black out, dim & restore via applescripts
On 29 Aug 2010, at 01:47, * wrote:

> I'm assuming that this line,

> tell application "System Preferences" to reveal anchor
> "displaysDisplayTab" of pane "com.apple.preference.displays"

> should be easily "unrevealed" but so far nothing I try works & I can't
> find the opposite command yet.

Have you tried just sticking this line in at the end of the script?

        tell application "System Preferences" to quit

Rich

________________________________________________________
WHEN REPLYING, PLEASE QUOTE ONLY WHAT YOU NEED. Thanks!
Change your preferences or unsubscribe here:
http://lists.figure53.com/listinfo.cgi/qlab-figure53.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sean Dougall  
View profile  
 More options Aug 28 2010, 10:20 pm
From: Sean Dougall <s...@figure53.com>
Date: Sat, 28 Aug 2010 19:20:10 -0700
Local: Sat, Aug 28 2010 10:20 pm
Subject: Re: [QLab] Screen black out, dim & restore via applescripts
Alternatively, if you wanted to keep System Prefs open in the background, but switch back to QLab, you could add this instead:

        tell application "QLab" to activate

-Sean

On Aug 28, 2010, at 6:05 PM, Rich Walsh wrote:

>> I'm assuming that this line,

>> tell application "System Preferences" to reveal anchor
>> "displaysDisplayTab" of pane "com.apple.preference.displays"

>> should be easily "unrevealed" but so far nothing I try works & I can't
>> find the opposite command yet.

> Have you tried just sticking this line in at the end of the script?

>    tell application "System Preferences" to quit

> Rich

________________________________________________________
WHEN REPLYING, PLEASE QUOTE ONLY WHAT YOU NEED. Thanks!
Change your preferences or unsubscribe here:
http://lists.figure53.com/listinfo.cgi/qlab-figure53.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
*  
View profile  
 More options Aug 28 2010, 11:43 pm
From: "*" <ra...@rabyn.com>
Date: Sat, 28 Aug 2010 22:43:11 -0500
Local: Sat, Aug 28 2010 11:43 pm
Subject: Re: [QLab] Screen black out, dim & restore via applescripts
The following works perfectly.

Thanks Rich!!!

I wonder if the "pane" needs to be opened in the first place or if the
adjustment could just be made without opening it.

Not that it matters since the solution closes it right after it opens but
just wondering to what extent applescripts have access to the nuts & bolts
of the OS.

*

-------------------------------------------------------------------

tell application "System Events"
        tell application "System Preferences" to reveal anchor
"displaysDisplayTab" of pane "com.apple.preference.displays"
        tell process "System Preferences"
                set value of slider 1 of group 2 of tab group 1 of window 1 to 0
                tell application "System Preferences" to quit
        end tell
end tell

________________________________________________________
WHEN REPLYING, PLEASE QUOTE ONLY WHAT YOU NEED. Thanks!
Change your preferences or unsubscribe here:
http://lists.figure53.com/listinfo.cgi/qlab-figure53.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
*  
View profile  
 More options Aug 28 2010, 11:46 pm
From: "*" <ra...@rabyn.com>
Date: Sat, 28 Aug 2010 22:46:59 -0500
Local: Sat, Aug 28 2010 11:46 pm
Subject: Re: [QLab] Screen black out, dim & restore via applescripts
Thank you Sean!!!

*

On Sat, August 28, 2010 9:20 pm, Sean Dougall wrote:
> Alternatively, if you wanted to keep System Prefs open in the background,
> but switch back to QLab, you could add this instead:

>    tell application "QLab" to activate

________________________________________________________
WHEN REPLYING, PLEASE QUOTE ONLY WHAT YOU NEED. Thanks!
Change your preferences or unsubscribe here:
http://lists.figure53.com/listinfo.cgi/qlab-figure53.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »