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


Click here to return to the 'A better way to do this...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A better way to do this...
Authored by: sjonke on Jul 02, '01 06:58:21PM

... is to, in Terminal, make a new window and then Save it to disk. Now drag that file (will have the extension .term) onto BBEdit. Change the lines:

<key>Shell</key>
<string>/bin/tcsh</string>

to whatever command you want to do. For example:

<key>Shell</key>
<string>top</string>

Lastly, make sure the shell exit action is 0:

<key>ShellExitAction</key>
<string>0</string>

Save the file. Now you can double click it to open a top window (put in the Dock or wherever.) If you press Control-C in the window TOP will stop and the window will go away automatically. Or you put whatever you command you want in there. Other ideas: put in commands like telnet some.place.org to make a double clickable file that takes you to a particular site. Etc. etc. Also, you can set the terminal windows name - just look at all the option availble in the file and set to what you want. You can also provide commands to run after the shell command is run. So if you want to do multiple commands, keep the shell command as is, but add commands to the "ExecutionString". Put a return after each command or you will have to type the return manually. Enjoy.

Steve



[ Reply to This | # ]
A better way to do this...
Authored by: owain_vaughan on Jul 03, '01 05:08:49AM

If you don't like editing xml files y hand, then use the PropertyListEditor from /Developer/Applications (if you've installed the Developer Tools CD)



[ Reply to This | # ]
Setting more options easily, plus drop scripts
Authored by: sjonke on Jul 03, '01 11:17:28AM

Another way to edit various settings of the .term file is to run it and then move the window and/or resize it, change title, set colors, etc, and then save the file. Whatever you did will be saved and the next time you run it all those settings will be stored. Also you can manually set the TerminalOpaqueness property if you want a specific window to be more or less transparent then your normal terminal windows. To do that you have to edit the .term file with BBEdit or the PropertyListEditor.

Lastly, if you want to use AppleScript to perform shell commands, download the very cool scripting addition called OS X Power Additions Lite. It provides a Shell command and returns the results of whatever was run. See:

http://www.versiontracker.com/moreinfo.fcgi?id=10549

It creates some really cool possibilities for integration of apple-scriptable OS X and Classic applications with shell commands. I just wish more OS X software was scriptable with AppleScript. I can't find the DropScript tool mentioned in another messsage either, however, you can create these kind of drop scripts with AppleScript via this scripting addition, and then you have both the power of unix and the power of AppleScript and whatever you want to integrate it with. Unfortunately, currently the addition does not allow for running commands with password-required sudo. Hopefully that will be added.



[ Reply to This | # ]
Setting more options easily, plus drop scripts
Authored by: sjonke on Jul 03, '01 11:18:28AM

Another way to edit various settings of the .term file is to run it and then move the window and/or resize it, change title, set colors, etc, and then save the file. Whatever you did will be saved and the next time you run it all those settings will be stored. Also you can manually set the TerminalOpaqueness property if you want a specific window to be more or less transparent then your normal terminal windows. To do that you have to edit the .term file with BBEdit or the PropertyListEditor.

Lastly, if you want to use AppleScript to perform shell commands, download the very cool scripting addition called OS X Power Additions Lite. It provides a Shell command and returns the results of whatever was run. See:

http://www.versiontracker.com/moreinfo.fcgi?id=10549

It creates some really cool possibilities for integration of apple-scriptable OS X and Classic applications with shell commands. I just wish more OS X software was scriptable with AppleScript. I can't find the DropScript tool mentioned in another messsage either, however, you can create these kind of drop scripts with AppleScript via this scripting addition, and then you have both the power of unix and the power of AppleScript and whatever you want to integrate it with. Unfortunately, currently the addition does not allow for running commands with password-required sudo. Hopefully that will be added.



[ Reply to This | # ]