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


open | 20 comments | Create New Account
Click here to return to the 'open' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
open
Authored by: hayne on Jun 21, '04 04:05:45PM

The same functionality is available via the standard 'open' command (/usr/bin/open).
E.g.:
open -a TextEdit

Do:
man open
for more details.



[ Reply to This | # ]
open
Authored by: gshenaut on Jun 21, '04 05:55:17PM
That's similar, but not identical functionality. It needs the -a and quotes around names containing spaces, and it can't do things like "quit". Also, since it's a script, it's possible to make other customizations on "run", such as looking up the full name in a table, so you can say "run word" instead of "run microsoft word":
exec osascript <<EOF
tell app "`grep $1 < ~/etc/longnames`"
	activate
end tell

Greg Shenaut

[ Reply to This | # ]

automaitc "longnames" list
Authored by: nick on Jun 27, '05 10:19:15AM

i figured out this one:

[code]
#!/bin/sh

exec osascript <<EOF
tell app "`ls /Applications/* | grep \.app | awk -F .app '{print $1}' | sed s/'\/Applications\/'/''/ | grep -i $1 | head -1`"
activate
end tell
[/code]
so i don't have to maintain the "longnames" list.



[ Reply to This | # ]