|
|
Excellent!
Thanks for the great hint. I'm sure there is probably a good reason why, but why not include the "tell application X to activate" line at the beginning of your helper function?
Excellent!
if he moved the activate into the helper, it wouldn't be 100% generic. it would just be a itunes script.
Not quite what I asked
He passes the app name ("iTunes" in his example) to the helper function. What I was asking is why not use that function argument to tell the appropriate app to activate. Like the "WHY NOT..." part below:
Not quite what I asked
Yeah, that makes quite a bit of sense. I guess I never thought about it. One thing worth pondering is that I think some applications may do something if you activate them when they're already frontmost (applications can handle the activate message however they want AFAIK). So if we grab multiple menu items in a row, the app will end up being activated several times. Still, this probably a non-issue, so go ahead and add that line.
Excellent!
BTW you can go shorter and put it "active application X" instead of "tell application X to activate" |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks 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.06 seconds |
|