Computer network

i want to connect two computer via wireless, but the procedure is reoccurring and really tedious;i want a script to:

1-enable airport (wireless) connection of my mac (the other one is already in wireless mode)
2-create a computer network between these
3-prompt me (display dialog) for the password to establish the connection
4-to connect both servers

somebody knows how to build such a shell-syntax?

Step 1:
Some do this with GUI scripting other by shell scripting. Airport can be controlled with networksetup utility. networksetup -getairportnetwork to detect if network is already chosen
networksetup -setairportnetwork [password] to choose the right network
networksetup -getairportpower to detect if airport is on
networksetup -setairportpower to turn airport on or off

Not sure what you mean by this. When your inside a network you already have a network. When another mac hosting the wireless network you should connect to this network as in step 1

Step 3:
Look in step1

Step 4:
Is it a normal AFP connection? Then you could use command mount to mount a network volume to your system. In shell it takes some more steps because you first have to know if the mount path exists, then create a new folder and at last you could mount the volume with mount_afp.

No problem at all to script this.

Hi DJ Bazzie Wazzie

i’ll try to code it-because such kind of scripting is a bit obscure to me.