Skip to content

July 23, 2005

17

Display Rotation Script

One of my favorite features of Tiger is the ability to rotate the display. My fabulous friends and family got me a Dell 2005FPW for my 30th birthday, and being able to rotate it to read code and research papers is a tremendous treat.

However, I find it a nuisance to click the display preference Rotate pop-up button, then turn the display, and click the confirm button before my 15 seconds are up.

To simplify that interaction, I’ve written two scripts to do the clicking for me. One rotates clockwise, the other counter-clockwise. If you think that would be useful to you as well, please, help yourself. Add them to your Finder applescript menu, or add them to a hot key launcher (in my case, I added two Triggers to Quicksilver)

Update 2007.01.10: I’ve tested the scripts in Leopard (10.5.x) and everything still works.

Update 2006.03.04: I’ve modified the scripts to handle rotation of displays with the same name. (thanks for the pointer David!) Please download them again and overwrite the old scripts.

Read more from Technical
17 Comments Post a comment
  1. Jul 30 2005

    I’m an ibook owner. I’d love to rotate the display on this puppy so I can read pages portrait style. If you hear of any leads, please let me know. thanks!

  2. Aug 1 2005

    Man, you suck! Reading your post is making me make an impulse buy of this monitor! You’re causing me to spend $500, you basard! :)

    But seriously, I had no clue 20″ LCDs were so cheap now.

  3. Lalo Landas
    Aug 13 2005

    dude… is there anyway you can flip it horizontal! i have an issue with a video beam… i might need that.

    thanx!

  4. David
    Sep 6 2005

    Thanks for the script. I used it on my dual-monitor setup, and it rotated the first display twice. Each window is named the same as the name of the monitor, and since they are the same make/model number, it picked the same one twice.

    I fixed that by using a numerical reference (1 or 2). The only trick is that the “confirm” command always goes to window #1, because as soon as you change the rotation, that display’s window becomes first.

    Works like a charm now.

  5. Nov 5 2005

    Thank you! Just what I was looking for.

  6. Justin Leader
    Mar 3 2006

    For David, who got the script to work with Dual displays (or anyone):

    How exactly to you modify the script to work with dual displays? I want to be able to pivot the main display. Tips? Thanks.

  7. Mar 5 2006

    To whom it may apply, THANK YOU! I have been searching for this script for 6 days. I have a powerbook G4 17in and recently purchased a Gateway 21″ FPD2185W HD Monitor.

    I have downloaded this script and have it triggered by one of my mouse buttons. It seems to work fine with opening the system preferences, locating the Gatway monitor and rotating it. It seems to get stuck at the “REVERT/CONFIRM” window. Then i get this error. Below is the error I’m receiving.

    System Events got an error: NSReceiverEvaluationScriptError: 4

    Is thier a way to get the script to also confirm this action and all will be good?

    Agian I praise you for this script as I feel i can get some sleep now :)

    Nathan

  8. May 20 2006

    Thanks! Just what I was looking for!

  9. May 28 2006

    Hi there! I’ve modified your script so that it only toggles between landscape and portrait modes.

    I have a Dell 1905FPV which rotates 90° in one direction only, so I hard-coded landscape and portrait rotations into a single applescript, which I can trigger with a keypress to toggle between modes automagically. I also reduced the delay for the ‘confirm’ button press after a rotation to non-standard mode.

    I’ve put a page up with my modified applescript (http://fancyham.com/tips/OS_X_toggle_display_rotation_applescript.html). Please feel free to incorporate any of my changes into your script.

    Thanks again!

  10. Jun 3 2006

    I just recently got a Dell 2007FPW and this script saved me the trouble of writing my own. Thanks!

  11. Mark
    Sep 16 2006

    I have a samsung and spent all afternoon messing around with a script then it hit me there must be one out there. In less than 20 seconds I was spinning that monitor like a top.

  12. Louis-Philippe
    Feb 6 2008

    Is there anyway that you can send me the quicksilver Triggers they are no longer onto their website, the link you provided is no longer active.

  13. soCram
    Jun 15 2008

    It doesn’t work with leopard 10.5.3 anymore :(

  14. soCram
    Jun 15 2008

    It works in the german version also after changing a few lines:
    The changed version can be downloaded here:
    http://home.arcor.de/socram/misc/RotateDisplay.scpt

  15. Conrad
    Jun 15 2008

    I haven’t had any problems with the script in 10.5.3 on the U.S. version of OS X, but Bryan’s changes linked above are a welcome modification to enable running the same script just to swap between portrait and landscape (0º-90º-0º). Thanks for the updates Bryan!

  16. soCram
    Jun 15 2008

    As you said, because you use the US-Version.
    To append: The original script can be found here: http://fancyham.com/ so you can send him your regards personally.
    The script isn’t my work, I only changed some lines. Just to clarify.

  17. Chaos
    Nov 22 2008

    this is all well and good, but i have dual monitors and i’d like for the LEFT monitor to rotate 90 degrees, and the RIGHT monitor to rotate 270 degrees. (options 2 and 4 in Display Rotation preferences) how would i go about doing this? this script works, but it rotates both of my displays either 90 degrees or 270 degrees. I dont really care if i need 2 scripts to do it. some thing i have in my favor is that the LEFT monitor is named “DELL 2407WFP” and the RIGHT monitor is named “Sceptre X24WG” even though they’re both Sceptre X24WG monitors. anybody care to show me how i would script this?

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments