QuickTopic (SM) free message boards QuickTopic (SM) free message boards
Skip to Messages
  Sign In to access your topic list  |New Topic |My Topics|Profile
Upgrade to Pro   Customize, show pictures, add an intro, and more:   QuickTopic Pro...and check out QuickThreadSM
Topic: ScriptingQuestion
Views: 562, Unique: 482 
Subscribers: 0
What's
this?
Printer-Friendly Page
Subscribe to get & post, or stop messages by email Subscribe
All messages            11-11 of 11  1-10 >>
About these ads
Who | When
Messagessort recent-bottom   
Post a new message
 
jm3.net  11
12-20-2002 07:12 PM ET (US)
the answer you need seems to depend on how you work, so:

if you run the script from a Terminal window, and want it closed as soon as your script executes, just can get the process id of the PARENT process (which will be the shell == your Terminal window) and kill that. essentially, you are writing a suicidal script, or technically, a patricidal script. (if you're the type of person who thinks about such things.)

the way to do the above is just to add:
kill -9 $PPID
to the end of your script.

(make sure your terminal prefs are set to close the window when the shell exits, or your stale window will hang around.)

on the other hand, if you mean to launch those apps on login, then just run your script from your .login/.profile/.bashrc/whatever init file corresponds with the shell you're using (most likely bash). then they'll stay open until you close them. (prolly not what you want, but who knows?)

finally, if you are using this script as a generic gui app-launcher, then it sounds like ssp's advice of using applescript is the way to go -- not because applescript is particularly capable, but because it's stitched to tightly to the gui. i swore off applescript in my university days, and so i can't speak to what its present day os-x capabilities are, but it would be a poor applescript indeed that couldn't fire off your shell script, giving you the power of the nix shell and the nice interface of aqua -- and isn't that what os/x is really all about?
RSS link What's this?
All messages            11-11 of 11  1-10 >>
QuickTopicSM message boards
Over 200,000 topics served
Learn more Frequently asked questions  Acknowledgements
What they're saying about QuickTopic
 Questions, comments, or suggestions? Contact Us
Read our use policy before beginning. We value your privacy; please read our privacy statement.
Copyright ©1999-2008 Internicity Inc. All rights reserved.