|
|
GUI scripting in Applescript
|
|
|
|
Fresh-Faced Recruit
Join Date: Sep 2002
Status:
Offline
|
|
Hi
I am trying to make a script that can open up System Preferences, select International, select Input menu and then change the keyboard layouts by clicking to select and deselect.
I've managed to get to Input menu but no matter what I try I still cannot find out how to click on the checkboxes there.
it should be something like this, shouldn't it :
click checkbox 1 of row 1 of table 1 of scroll area 1 of tabgroup 1 of window "International"
But nothing happens. Any ideas ?
I am using UI browser.
By the way, is it perhaps possible to achieve what I am trying to do without GUI Scripting ?
------
tell application "System Preferences"
activate
end tell
tell application "System Events"
tell process "System Preferences"
click button "International" of scroll area 1 of window "System Preferences"
delay 1
tell window "International"
tell tab group 1
click radio button "Input Menu"
delay 1
end tell
end tell
end tell
end tell
-------
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Dec 2002
Location: someplace
Status:
Offline
|
|
GUI scripting is currently in beta. I think you are encountering a bug that is currently insurmountable. Others on another forum are attempting to accomplish a similar feat with the International pref pane and are running into similar problems:
http://forums.osxfaq.com/viewtopic.php?t=5459
The only recourse would be to create two plist files, each with the appropriate keyboard layout. Copy them into place and relaunch the Finder. You can accomplish this via an AppleScript or shell script.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Sep 2002
Status:
Offline
|
|
Yes, I see. It seems to be a bug.
"The only recourse would be to create two plist files, each with the appropriate keyboard layout. Copy them into place and relaunch the Finder. You can accomplish this via an AppleScript or shell script."
Hmm...yes, I could try that.
But where is the plist- file for the International prefpane ?
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Jul 2001
Location: New York, NY
Status:
Offline
|
|
I'm guessing there's some reason using the keyboard layout menu (that appears when you have more than one input keyboard selected) doesn't work for what you need to do?
(if it did, that might be another way to get around the bug you're running into)
|
cpac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|