Bioware, the company that created Neverwinter Nights, is kind enough to provide a Dedicated Server for their program. What this means is that you can download this application. Install a copy of any modules you have into it’s module directory, and run the server without needing another CD Key. Of course it’s dedicated which means you can’t play on that machine. That’s the whole point, you play on another machine and connect to the server.
However, on the Mac you have to have direct access to the machine to setup and run the server. After some recent posts to the Mac NWN forums, I’ve been contemplating various ideas on how to make a remote control for the server. This would allow you to change settings, like selecting which module to load, and not actually be in front of the server computer.
I’ve been playing with AppleScript UI scripting for several hours tonight and I’m banging my head against the wall. The major problem is that the Mac Dedicated Server does not seem to send the proper response to the system after it has run. With basically every Mac application, even ones that are not directly AppleScriptable, you should be able to send this command:
tell application "Dedicated Server" to activate
If the application is not running, it will run and come to the foreground. If it is already running, it will just come to the foreground. It is critical for the application to come to the foreground for UI scripting because you are simulating mouse clicks and menu selections. For some reason with Dedicated Server, the activate
command will cause it to run, but then the AppleScript will hang. If the server is already running, the script will also hang on the activate
command. You end up have to press Command-Period to escape out of it.
If the activate
command would work properly I am convinced that I could quite easily come up with a remote control. All of the user interface elements show up properly when interfacing with AppleScript’s UI Element Inspector. In fact I can use that program to simulate clicks to the various buttons on the server interface. But because of that stupid activate
command not working, no dice.
Ugh.