Changing screen resolutions - updated
Changing screen resolutions - updated
- Subject: Changing screen resolutions - updated
- From: Paul Thompson <email@hidden>
- Date: Thu, 8 Jul 2004 15:59:15 -0400
Hi Everyone,
I have made progress on my script to change screen resolutions,
thanks to the help from Jason Kacmarski. My script as it now stands
will change the resolution of the screen, but I still am having trouble
getting it to change the colours. After that I have it launch classic,
and then the program the kids will use. I think that where I'm going
wrong is that way I'm trying to manipulate the change for the colours,
and not understanding how to write and if/then statement for classic to
check whether it is running or not.
If someone out there might have a moment to perhaps give me a push in
the right direction for what I'm doing wrong, I would greatly
appreciate it.
Thank you,
Paul
Here is the script currently, with what I learned by using
UIElementInspector
tell application "System Preferences"
activate
set the current pane to pane "com.apple.preference.displays"
end tell
tell application "System Events"
tell process "System Preferences"
tell tab group 1 of window 1
click radio button "Display"
tell group 1
tell table 1 of scroll area 1
repeat with i from 1 to count of rows
if value of text field 1 of row i is "1024 x 640" then
set selected of row i to true
end if
end repeat
end tell
tell table 1 of pop up button 1
repeat with i from 1 to 3
if value of pop up button 1 of text field i is "Thousands" then
set selected of row i to true
end if
end repeat
end tell
end tell
end tell
end tell
end tell
tell application "System Preferences"
activate
set the current pane to pane "com.apple.preference.classic"
end tell
tell application "System Events"
tell process "System Preferences"
tell tab group 1 of window 1
click radio button "Start/Stop"
click button "Start"
end tell
end tell
end tell
Using the UIElement Inspector, I found out that button for the color is
listed as a pop up button:
<AXApplication: System Preferences>
<AXWindow: iMac>
<AXTabGroup>
<AXGroup>
<AXPopUpButton>
<AXMenu: OtherViews>
<AXMenuItem: Thousands>
Attributes:
AXRole: AXMenuItem
AXRoleDescription: menu item
AXChildren: (null)
AXParent: <AXMenu: OtherViews>
AXTitle: Thousands
AXEnabled: 1
AXPosition: x=707 y=191
AXSize: w=185 h=19
AXSelectedChildren: <array of size 0>
AXVisibleChildren: <array of size 0>
AXHelp: (null)
AXMenuItemCmdChar:
AXMenuItemCmdVirtualKey: (null)
AXMenuItemCmdGlyph: (null)
AXMenuItemCmdModifiers: 0
AXMenuItemMarkChar:
Actions:
AXCancel - cancels menu tracking
AXPick - selects a menu item
AXPress - selects a menu item
I also found out that the start button for classic seems to have a
value of one, whether it is started or stopped. Is this because there
is only one option at any given time?
<AXApplication: System Preferences>
<AXWindow: Classic>
<AXTabGroup>
<AXButton: Start>
Attributes:
AXRole: AXButton
AXRoleDescription: button
AXHelp: (null)
AXEnabled: 1
AXFocused (W): 0
AXParent: <AXTabGroup>
AXWindow: <AXWindow: Classic>
AXPosition: x=49 y=388
AXSize: w=108 h=33
AXTitle: Start
Actions:
AXPress - press
_______________________________________________
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.