|
|
10.7: Finding Control and Menu Items for use in AppleScript User Interface Scripting
Munging the output:
To clean up the text of the output, you can use TextWrangler (or other free text processors, probably including TextEdit).
In TextWrangler, select the Find... menu item under the Search menu, and enter , in the Find: field and \n in the Replace: field. Make sure Grep is checked. Hit the Next button to highlight the first ",", then Replace & Find. You'll see the first item split off making it easy(er) to read. Once you're happy the replacements are working as expected hit Replace All to get the rest. This is not perfect: in Safari, for example, the History menu may contribute huge numbers of elements, some of which may contain "," internally, messing this up, but for most uses it works pretty well. You also may need to remove some "{" and "}" characters, etc. I opened the resulting file in Numbers, making it easy to insert a descriptive column if I wish. NB: MUNG is a "recursive" acronym. It stands for Mung Until No Good. It sometimes confuses civilians and Muggles.
Re: 10.7: Finding Control and Menu Items for use in AppleScript User Interface Scripting
In TextWrangler, select the Find... menu item under the Search menu, and enter , in the Find: field and \n in the Replace: field. Make sure Grep is checked.Since all the items seem to end with 'of application "System Events", ', you can use something like '"System Events", ' as your find term and '"System Events"\n' as your replace term and avoid the "commas-in-item-titles" problem. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|