[SVN] Bundle commit 321
Kevin Ballard
kevin at sb.org
Sun Feb 20 15:33:24 UTC 2005
On Feb 20, 2005, at 4:46 AM, Eric Hsu wrote:
>> If it is, it might be nice to check if the user has the pro version
>> -- I'm quite sure I read somewhere how one could query the Launch
>> Services database from a shell script, but I can't find it at
>> present, and I have given up on AppleScript :/
It's possible to *register* applications with a shell script (the
LaunchServices framework has a tool called lsregister), but I just
checked and the only way to query it is to do something like
`lsregister -dump | grep OmniOutliner\ Professional'. First off, the
-dump dumps *everything* in the LaunchServices database, and secondly,
I believe that if OmniOutliner Professional is deleted, it will still
exist in the LaunchServices database for at least a while.
> You are quite correct from a UI standpoint... but I figured the time
> it would take me to figure out how to do it might exceed the total
> time of all people changing the command themselves to suit their
> version of OO. :)
Why not just check the return code of `open', and if it's non-zero (it
returns 1 when it can't find the specified app), strip the
"Professional" and try again.
--
Kevin Ballard
kevin at sb.org
http://www.tildesoft.com
http://kevin.sb.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2378 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate-dev/attachments/20050220/9d31af7d/attachment.p7s>
More information about the textmate-dev
mailing list