Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Yes :-) | 13 comments | Create New Account
Click here to return to the 'Yes :-)' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Yes :-)
Authored by: sabi on Nov 12, '01 12:04:58AM

Locating an application by name does not work if you've renamed the
application. Consider the standard practice of including an
application's version in its name, e.g. (picking one example on my
hard disk) "Adobe GoLive 5.0". Once you upgrade to GoLive 6, all your
scripts that refer to it will break. This is why matching an
application by name is not the answer. See my post above, a decent
replacement for 'open' would match apps by creator and/or bundle ID,
neither of which change no matter where you move the application. Of
course there are still issues if you have multiple versions of an
application installed.



[ Reply to This | # ]
Perhaps,but...
Authored by: serversurfer on Nov 12, '01 03:19:01AM
I renamed ~/Applications/Xoptimize/Xoptimize to Xoptimize2 in the Finder then used the duplicate menu item on it. Then, in the terminal, I executed
o xoptimize2

o "xoptimize2 copy"

This opened two copies of Xoptimize side by side. I didn't have to log out or even rehash. They both still thought they were called Xoptimize, but they operated independently of each other. (X rules)
I don't disagree that your program looks pretty cool. The 'open owner of this pref' option seems interesting enough on its own. I'm just saying that for opening apps and their data files from the terminal open does the job pretty well. And as far as breaking all your old scripts when you update/rename your app, just run the scripts through sed. Besides, that's why you shouldn't put version numbers in the bin name.
BTW, is your app called launch or FindApp? :-)

[ Reply to This | # ]