Jump to content
Sign in to follow this  
Hawkslayer

Any idea how to make a .bat equivalent for OSX?

Recommended Posts

I'm a new Mac user and love it.. but some games (like this one *growl*) default to dos style commmand line switches in order run them. (it's called GUI, look it up mister 1992 *wink*)

Could someone help me out in figuring out how to automate this?

"DropTeam.app/Contents/MacOS/DropTeam -enterlobby false –hostmode

server –lobbyname ThePainStation –numbots0 8 –numbots1 8 –

dynamicbots true –password LookingGlass –gametype Objective"

This is basically what I wanna automate (not this exactly) which I copied from the pdf manual.

Thanks for your help.. and be nice to me in game! =)

Share this post


Link to post
Share on other sites

You can write a bash script and save it with a ".command" extension so it will run when you double click it.

The script would look like this:

</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">#! /bin/bash

cd /Applications/DropTeam

rm -rf nohup.out

nohup DropTeam.app/Contents/MacOS/DropTeam -enterlobby false –hostmode

server –lobbyname ThePainStation –numbots0 8 –numbots1 8 –

dynamicbots true –password LookingGlass –gametype Objective &</pre>

Share this post


Link to post
Share on other sites

Thanks Clay!

Sadly it doesn't like this file (used TextEdit and saved it as .command) Console said it couldn't open this file, although it did open the console app, so it seems the association is right.

Is there a special formatting type for it or something? (unicode, etc)

Share this post


Link to post
Share on other sites

Hi Hawkslayer.

You may have saved it as RTF.

Try saving it as raw text, as TextEdit will default to RTF format.

Under the Format menu, in TextEdit there is an option to convert whatever you are writing to plain text.

Share this post


Link to post
Share on other sites

As an update to Clay's post, you gotta go into the terminal and use chmod to make the script executable (chmod +x filename).

You can't seem to do this via the finder.

I still haven't gotten things to actually RUN but at least the .command file runs now.. so maybe I'll get a server up before New Years =)

Edit: Finally figured it out smile.gif (had bad characters in the text file that were causing errors)

[ December 11, 2006, 12:12 PM: Message edited by: Hawkslayer ]

Share this post


Link to post
Share on other sites
Sign in to follow this  

×
×
  • Create New...