Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

An AppleScript to detect displays when operating blind System
So I recently had a rather unpleasant conference experience. I plugged my old Ti PowerBook into the supplied projector. The PowerBook found the projector and made the projector the main display. Unfortunately, the projector just gave a blue screen. I needed to reset the resolution. OK, fine, except the menu bar, dock and all icons are now in the blue. I unplug the PowerBook from the projector: nada, nothing, no change, zippo -- the PowerBook still seems to think it is talking to the projector. I hate to say it, but for the first and only time in my many years of Mac ownership, I thought, "If this were a PC, I could hit one of the function keys and my problem would be solved." I could not think of a decent solution on the spot, so I wound up doing a forced restart. It took forever, all in front of a couple of hundred people. Never again...

Anyway, here's my fix: I wrote this simple script


tell application "System Preferences"
  activate
  set current pane to pane "com.apple.preference.displays"
end tell
tell application "System Events"
  tell process "System Preferences"
    click button "Detect Displays" of group 1 of 
     tab group 1 of window "Color LCD"
  end tell
end tell

Then, using Key Xing (there are other applications you could use), I set Shift-F12 to run the script from anywhere. This would have fixed my problem after I unplugged the projector ... BTW, if anyone from Apple is listening, the Keyboard Shortcuts pane in 10.3 is a sick joke. I should have been able to set this up with a couple of mouse clicks. Grrr...

    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[6,419 views]  

An AppleScript to detect displays when operating blind | 5 comments | Create New Account
Click here to return to the 'An AppleScript to detect displays when operating blind' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to detect displays when operating blind
Authored by: maceuph on Jan 15, '04 02:37:21PM

Dude, can't you just hit F7 on you 'book. I think on older machines you can also hit cmd-F1 or cmd-F2. RTFM



[ Reply to This | # ]
An AppleScript to detect displays when operating blind
Authored by: houchin on Jan 15, '04 03:02:16PM

On my TiBook 550, cmd-F2 does detect displays, and cmd-F1 does switch mirroring.



[ Reply to This | # ]
An AppleScript to detect displays when operating blind
Authored by: MattHaffner on Jan 15, '04 03:43:28PM

Yes, really, there are several more elegant ways to extract yourself here. The F7 one is the best.

But even if you didn't remember that, the forced restart was overkill. Next time just put your machine to sleep and wake it up without the projector. Step-by-step: pull your power cord and close the lid to make it go to sleep. Unplug the projector cable, re-open, set resolution, sleep, re-connect cords, get on with your talk!



[ Reply to This | # ]
Just put it to sleep and wake it up again
Authored by: TvE on Jan 16, '04 03:18:59PM

I believe that my TiBook (867MHz) re-detects displays after wake-up. So just close the lid, take out the projector and the open the lid again.
Perhaps this is model-specific and it will not work on your book...



[ Reply to This | # ]
An AppleScript to detect displays when operating blind
Authored by: scottcarney on Jan 30, '04 11:19:34AM

The machine would not sleep when the lid was closed. I might be a little dumb, but not that dumb. It was one of the first things I tried.



[ Reply to This | # ]