Page 1 of 1

BZAdmin (Mac users only)

Posted: Mon Nov 29, 2010 12:39 am
by Scythio
So I go tired of having to manually type out the code to launch and use bzadmin, so I took a few minutes and threw together a simple AppleScript application to do it for me. I know that most of you experienced mac users have already made similar apps, but I thought I'd share it anyway.

You can download the app here: http://cl.ly/3RXM

Now if you do not have multiple callsigns that you use (unlike me) you can easily modify the code to automatically insert your callsign and password by default by opening it up in AppleScript Editor default and changing:

Code: Select all

set callsign to text returned of (display dialog "What is your callsign?" default answer "")
set psswrd to text returned of (display dialog "What is your password?" default answer "")
to

Code: Select all

set callsign to text returned of (display dialog "What is your callsign?" default answer "CALLSIGN GOES HERE")
set psswrd to text returned of (display dialog "What is your password?" default answer "PASSWORD GOES HERE")
Otherwise it is easy to use- just type in the info and go.

Again, this is for MAC users only.

Anyone who cares to see the code without downloading it for one reason or another --> http://d.pr/g5q2
I don't know what the heck dropIr did to the line indenting, but w/e.

Oh, and this works with BzFlag 2.0.16 only, but you can change the version to the version of your client by changing:

set thescript to "/Applications/BZFlag-2.0.16.app/Contents/MacOS/bzadmin " & callsign & ":" & psswrd & "@" & server & ":" & prt

Re: BZAdmin (Mac users only)

Posted: Mon Nov 29, 2010 10:50 pm
by mrapple
One trick I use is taking advantage of a file called .profile in your home directory.

Open up the file .profile in your home directory in a text editor.

You can easily make aliases by adding the following code

Code: Select all

alias s = 'ssh tony@bzextreme.com'
So to make a bzadmin alias you could do something like

Code: Select all

alias bza = 'bzadmin user:password@server:port'
Since the server/port is static, this would really only be useful with a server you connect to often.

Re: BZAdmin (Mac users only)

Posted: Mon Nov 29, 2010 11:47 pm
by Scythio
Eh you could do that, but for the noob mac users, it would pretty much confuse the heck out of them. Besides, I don't always connect to the same port. Anyway this is for the novice users. I have my script set to server: "bzaddict.net" and port "5".