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


Click here to return to the 'try a shell script..' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
try a shell script..
Authored by: Anonymous on Mar 29, '01 02:51:21AM
You could create a quick shell script that runs the bbs command for you: Edit the script with vi or whatever editor:
vi foo.sh
The contents would be something like this (the first line is critical):
#!/bin/sh
/path-to-bbs/bbs -flag1 -flag2 -flag3
Then make it executable:
chmod +x foo.sh
Changing permissions can probably be done from the Finder, but I'm more of a command line kind of guy :). You can then double click on foo.sh from the finder and select the Terminal to run it from, or cmd-option-drag it onto the Terminal icon in the Dock to run it. This isn't exactly perfect, but if you could permanently associate it to run with the Terminal, then you could double-click it and it would run every time. Anyone out there know how to make certain type of file get run with a particular program every time?

[ Reply to This | # ]
script execution from the finder
Authored by: Anonymous on Mar 29, '01 07:01:18AM

You can indeed run both scripts and command line compiled programs by command-option dragging them into the terminal program. If you want them to open in the terminal by default on double click, just use the file inspector (command-i) and go to the application pane. Now you can click on the empty square to pick an application to default to for this particular file. You can choose the terminal, but must use the pop-up menu to show all apps, not just recommended ones.

best wishes,
Toby.



[ Reply to This | # ]
script execution from the finder
Authored by: tomsinclair on Mar 29, '01 11:05:55AM

I believe that if you change the file extension to .command, you'll get an icon you can double-click and run in the Terminal.



[ Reply to This | # ]
script execution from the finder
Authored by: Anonymous on Mar 30, '01 06:26:57AM

I think I have also seen a software called "Shell scriptor" that allowed you to issue shell commands from AppleScript. I have downloaded it, but didn't find the time so far to figure out, how useful it is.
However, in order to build double-clickable shell-skripts, it should do.

Another way might be to create a Mac OS X bundle structure. (i.e. create a folder called xyz.app, with a folder Contents in it and a folder MacOS in it. I am not sure about the exact format, but it might work and you could also have custom icons, etc.



[ Reply to This | # ]