Hawkslayer Posted November 13, 2006 Share Posted November 13, 2006 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! =) Link to comment Share on other sites More sharing options...
ClaytoniousRex Posted November 13, 2006 Share Posted November 13, 2006 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> Link to comment Share on other sites More sharing options...
Hawkslayer Posted November 17, 2006 Author Share Posted November 17, 2006 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) Link to comment Share on other sites More sharing options...
Macrobiotic Posted November 20, 2006 Share Posted November 20, 2006 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. Link to comment Share on other sites More sharing options...
Hawkslayer Posted November 28, 2006 Author Share Posted November 28, 2006 Macrobiotic, hmm.. my textedit defaults to plain text (I am used to it from Notepad), unless I missed something. Link to comment Share on other sites More sharing options...
Hawkslayer Posted November 28, 2006 Author Share Posted November 28, 2006 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 (had bad characters in the text file that were causing errors) [ December 11, 2006, 12:12 PM: Message edited by: Hawkslayer ] Link to comment Share on other sites More sharing options...
Recommended Posts