New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus • Advice and insight from world-class Apple enthusiasts • Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

OS 10.4 - Applescript for Toggling Energy Saver Presets


Post Reply New Thread Subscribe

 
Thread Tools
Unifier

 
Member Since: Mar 16, 2008
Posts: 1
Unifier is on a distinguished road

Unifier is offline
Hello everybody, I'm a somewhat of a poweruser seeking to realize the full potential of my MacBook. After experimenting w/ Linux, I was wondering if it were possible to set OS X to lock my screen upon pressing ctrl + alt + L (without causing the "Require pass word to wake this computer from sleep or screen saver" setting to checked in the Security Preference Pane). After spending some time googling, I was able to do so by setting a Trigger in Quicksilver to run a Applescript file with the following contents:

activate application "SystemUIServer"
tell application "System Events"
tell process "SystemUIServer"
repeat with i from 1 to number of menu bar items of menu bar 1
tell menu bar item i of menu bar 1
click
try
if name of menu item 1 of front menu is "Lock Screen" then
click menu item "Lock Screen" of front menu
exit repeat
end if
end try
end tell
end repeat
end tell
end tell

As it turns out, the script performs this function as if I had moused over to the lock menubar item and selected "Lock Screen", complete w/ the item's visibility for a brief moment. In light of this, I was wondering if it were also possible for Applescript to toggle between two Energy Saver presets, also for the purpose of being used for a Quicksilver Trigger. Basically, I want to tell my OS the following "Click on the battery icon in the menubar. If Normal is checked, click Custom. If Custom is checked, click Normal". Is this possible? If so, what do I need to put in an Applescript file in order for it do this? Thanks in advanced to anyone who takes the time to read this and/or tries to help. A break down of what each line of text does would also be appreciated for educational purposes.
QUOTE Thanks
Soulwar

 
Soulwar's Avatar
 
Member Since: Jan 27, 2008
Location: Estero, FL
Posts: 1,515
Soulwar is just really niceSoulwar is just really niceSoulwar is just really niceSoulwar is just really nice
Mac Specs: iMac 17" 1Ghz G4  iPhone 3G  10.5.5

Soulwar is offline
Looks like others had the same idea.
http://www.versiontracker.com/dyn/moreinfo/macosx/33521
http://www.macosxhints.com/article.p...60724134300315
http://lists.apple.com/archives/Appl.../msg00017.html

When all else fails, try everything!
The Rep System and you.
Life's a joke...If you're not laughing, then you didn't get it.

June 2008

QUOTE Thanks

Post Reply New Thread Subscribe


« How to change harddrive name? | AppleScript Application with Keyboard activation »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Problem with energy saver in system preferences Follow OS X - Operating System 8 12-05-2010 07:23 PM
Energy saver schedule westiferus OS X - Operating System 4 06-03-2008 04:07 AM
monitor vs. energy saver ? which one is broken seraphodiabolus Apple Desktops 2 08-20-2007 01:58 PM
iMac Energy Saver is crashing computer? lokerd Apple Desktops 9 10-07-2003 08:30 PM
Energy Saver settings fasheezy Apple Notebooks 0 10-01-2003 08:58 PM

All times are GMT -4. The time now is 08:13 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?