BZAdmin (Mac users only)

All things BZFlag - no [OT] here please
Post Reply
Scythio
Private First Class
Private First Class
Posts: 42
Joined: Sun Feb 08, 2009 7:35 pm
Location: Aperture Science Lab Contaminant Quarantine

BZAdmin (Mac users only)

Post 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
Last edited by Scythio on Mon Nov 29, 2010 11:50 pm, edited 1 time in total.
Soon we will be facing bots that we can't beat...
User avatar
mrapple
Sergeant Major
Sergeant Major
Posts: 460
Joined: Wed May 27, 2009 11:59 am
Location: Unknown
Contact:

Re: BZAdmin (Mac users only)

Post 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.
Image
Scythio
Private First Class
Private First Class
Posts: 42
Joined: Sun Feb 08, 2009 7:35 pm
Location: Aperture Science Lab Contaminant Quarantine

Re: BZAdmin (Mac users only)

Post 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".
Soon we will be facing bots that we can't beat...
Post Reply