Script to change display resolution

Discussion in 'Mac Programming' started by airkarol, Dec 27, 2006.

  1. macrumors 6502

    Joined:
    Nov 12, 2005
    #1
    How would I make a script to automatically change the resolution of the display when another is plugged in?

    Thanks in advance.
     
  2. macrumors 65816

    fivetoadsloth

    Joined:
    Aug 15, 2006
    #2
    Hmm. This would be fairly easy in apple script, though i dont know quite enough to give you a working script, sorry. Ill see what i can do.
    Code:
    tell application "Finder"
    	activate
    	select window of desktop
    	select Finder window 1
    	set target of Finder window 1 to folder "Applications" of startup disk
    	select Finder window 1
    	select Finder window 1
    	open application file "System Preferences.app" of folder "Applications" of startup disk
    end tell
    That will open system prefernces though it is not when the display is plugged in and it doesnt change anything. Sorry :( Though i might be doing it completly inccorect, maybe someone with more experiance can help. (use script editor)
     
  3. macrumors 65816

    Unorthodox

    Joined:
    Mar 3, 2006
    Location:
    Not at the beach...
    #3

Share This Page