Re: UI Scripting Display's Resolution
Re: UI Scripting Display's Resolution
- Subject: Re: UI Scripting Display's Resolution
- From: Robert Poland <email@hidden>
- Date: Wed, 18 Feb 2004 10:37:48 -0700
Trying to create an applescript that changes the monitor's
resolution to 1280x1024 but it's buried in so many UI elements that
can't quite get it right. Here's what I have:
tell application "System Preferences"
activate
end tell
tell application "System Events"
tell process "System Preferences"
click menu item "Displays" of men "View" of menu bar 1
delay 3
select text field "1280 x 1024" of column 1 of table 1 of
scroll area 1 of group 1 of tab group 1
delay 1
end tell
end tell
but no matter how I try to reword the actual selection of the 1280 x
1024 I keep getting "NSReceiverEvaluationScriptError: 4" so I
realize my path to the text field isn't liked but don't know the
proper command. Any help greatly appreciated.
Aaron
After much trial and error I found what works for me;
tell application "System Preferences"
activate
end tell
tell application "System Events"
tell process "System Preferences"
click menu item "Displays" of menu "View" of menu bar 1
delay 4
tell window 1 -- "iMac"
click radio button "Display" of tab group 1
delay 1
tell tab group 1
tell group 1
tell scroll area 1
tell table 1
select row 1
-- 640 x 480
delay 1
select row 2
-- 800 x 600
delay 1
select row 3
-- 1024 x 768
delay 2
end tell
end tell
end tell
end tell
end tell
end tell
end tell
beep 2
--
Bob Poland - Englewood, CO
http://www.ibrb.org/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.