With the majority of the scripting in Max now complete, I’ve moved on to packaging up the benchmark, and creating the installer and wrapper that will automate everything. For this, we will use AutoIt. If you aren’t familiar with AutoIt, it is a very powerful automation tool. This will allow me to install Max from our server, apply any settings, initiate the benchmark, upload the results, and then delete any files once it is done.
The big downside is that this is a totally different scripting language than what I had to learn for Max. Programming isn’t my strong suit, so it's another learning curve I’ll need to work through. At the very least, this time I have some completed scripts from other benchmarks I can use as reference (i.e. steal lines of code from).
I started with the included documentation, but let me tell you, reading the help documentation for scripting languages is more than a little dry. After powering through a couple tutorials they had, I tried some based on what I wanted to accomplish. I started really small. Can I open Max, run the benchmark, and then close max. I had to make a couple quick tweaks to my Max scripts. First I made the initial script that opens the benchmark UI open whenever Max starts. That was as simple as moving the script to a specific folder, so I’ll need to be sure to have my installer put that script in the specific location. Second, instead of clicking on the start button and having the full bench suite run, I made it simply throw up a message box that says “Done”. No point in waiting 30+ minutes every time I want to test something.
This went fairly smooth with some trial and error. The problem with most scripting documentation is that it is written assuming the reader is already very familiar with programming concepts. Since that isn’t where I am at yet, I do a fair amount of Google searches. AutoIt has a good amount of users, so everything I’ve tried to search for has come up with some results. One thing that bugs me about a lot of these committees is you’ll find a forum post from someone saying, “I’m having trouble with this topic” and the immediate responses are “well did you read the help file?”. Yes, yes I did and it didn’t make sense so I came here. Nevertheless, I have a working script that will open, start the benchmark, then close when it is done.
From there I’ve decided to tackle two tricky parts at the same time. Because once you got one extremely basic task down, might as well do the hardest one next. Installing and copying files from our server to a local machine. Both of these will be interesting to tackle while working from home. I need to VPN into work to be able to access the network location. (Fun fact, I’ve never used a VPN before. So that was a whole ordeal.) At first I was worried about the installation process. AutoIt can see specific windows and execute key commands or mouse clicks, so I figured I’d have to run through the installation process and capture every window and code every step of the process. Fortunately, I found that Autodesk offers a network deployment tool. That sits on the network, and then when a local machine runs that installer, it installs Max to a predetermined location, inputs serial numbers, etc without any dialogs. I’m going to need to get assistance from someone else because I don't want to be running installers just anywhere on the network. I’m pretty sure Jon would appreciate it if I didn’t anyway. Besides it needs to know the exact network location then the tool is created, and I’m not 100% sure where that will be.
That is where I’ve ended the week. I was thinking I was getting really close to being done last week. But after diving into AutoIt, oh boy do I have a lot to do.