Re: GUI Scripting helper
Re: GUI Scripting helper
- Subject: Re: GUI Scripting helper
- From: Bill Cheeseman <email@hidden>
- Date: Tue, 21 Sep 2010 17:12:33 -0400
On Sep 21, 2010, at 3:46 PM, Alex Zavatone wrote: I've been back in some GUI scripting and getting the proper way to refer to UI elements can be a regular pain in the ass.
I just cooked this up to help myself out. Hopefully, it might help one of you out as well.
Some type of pretty printer function would be nice, but I just copy the output into SubethaEdit and replace this string with a return: ", ".
tell application "System Events" tell process "Any Application" -- change to the target app's name set frontmost to true tell window "Library" -- change to the target window's name
set myElements to every UI element set myElementNames to the name of every UI element set myClasses to the class of every UI element set myActions to the actions of every UI element ....
That's exactly right: you can get most of the relevant information about writing GUI Scripting scripts by using GUI Scripting itself. But you'll find it even more helpful to use Apple's free UIElementInspector or my UI Browser <http://pfiddlesoft.com/uibrowser>. Among other things, we give you the indexes of particular UI elements at a glance, which are harder to come by using GUI Scripting. |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden