MS-DOS batch file equivelent on OSX

Joined
Dec 11, 2008
Messages
1
Reaction score
0
Points
1
I written a foundation tool which I've been testing by hand typing the command in the Terminal. Now I'm happy that my application works fine, I want to write a script that will execute my tool and I would like to execute it by double clicking an icon (like an MS-DOS batch file).

I've read bits 'n pieces by googling and found a direction I can take. I can type my command into an ".sh" file. Going down this route however still didn't give the double click launch. I still had to go to the terminal and execute the script.

Can someone kindly point me in the right direction with this? :[
 
Joined
Mar 15, 2007
Messages
161
Reaction score
4
Points
18
Your Mac's Specs
17" MacBook Pro, 2.33GHz C2D, 2GB RAM
If you need a shell script to be wrapped around your tool, you can use AppleScript to run the script, by creating an AppleScript something like the following in Script Editor and then saving it as an Application (which will give you a GUI icon to launch the script):

tell application "Terminal" to do script "~/bin/mywrapperscript.sh"

If you haven't done anything with AppleScript before, here's a series of web pages that should get you started: AppleScript: Beginner's Tutorial
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top