Wednesday, December 21, 2011

It's that time again.

That season is once again upon us and I just want to take the time to wish everyone all the best for the holidays and the upcoming new year.

Also; for those of you anxiously awaiting the arrival of the new release version.
I suspect that Jon intends to make a Christmas gift of it so check the forums over the holidays.

Tuesday, December 20, 2011

Congratulations Steve.

I just returned home from a forced hiatus and noticed that we have a new Moderator.  Melba 23.  This is great news and I'm sure he will do a good job.  My most heartfelt congrats to both Steve and whoever it was that decided he should be promoted into that position.

Sunday, December 4, 2011

Online Help pages

For those of you who have been linking to my online help pages; Thank you very much.
Several months ago Valik asked for the code I used to create those pages.  I sent him a version that was slightly modified to bring it more in line with what he wanted to do.  The idea was to update the look of the official online docs page.
I have no idea if that project is still in the works or not; nor does it matter any longer.
With a new release version of AutoIt due out anytime now I felt it was an appropriate time to discontinue my online help instead of updating it again.  Today being one of the few days when I have the time available to work at a few things I decided to do it now as opposed to doing it somedays after the new release.  Anyone going to that site will now be redirected to the official docs page.  I'll be leaving that redirect in place for a few months so people have the opportunity to change their links.
Again, thanks to everyone for thier support over the last few years that the site has been active.

Saturday, December 3, 2011

Tip about @ScriptDir

You may someday find yourself in the situation I was in not too long ago.  It's a script where I was working with several directories and having to use FileChangeDir() quite a bit.  Of course that changes the working directory from it's normal location which is @ScriptDir.  That also meant that in order to use a couple of exe files that were stored in the scripts folder I would either have to use a FileCopy or FileMove to put those files in a folder that is in the path environment; for example the Windows folder.  If I didn't do that it meant that everytime I wanted to call one of those files I had to specify it with @ScriptDir & "\somefile.exe".  Since those files had to be called quite often I chose another route.
Near the top of your script just add the following line.
EnvSet("path", EnvGet("path") & ";" & @ScriptDir)  That adds the script directory to the path environment but only so long as the script is running.  It's not a permanent change unless you use EnvSave("path").  That means I can then call the file without a path and without worrying about what my current working dir is.
ShellExecute("myfile.exe") would be the same as using ShellExecute(@ScriptDir & "\myfile.exe") but with a lot less typing involved.