I found a great program that takes my x10 perl programs and converts them to an .exe file.
Once you have an .exe file, you can get AHP to execute it in a macro.
I just wrote and tested a couple perl programs that make decisions based on modules being on or off, is it daytime or night, take a snapshot, turns on some lights first and then take a snapshot, etc.
Here's the program, it's called perl2exe
It times out after 30 days and then it's $49 for the cheapest version.
http://www.indigostar.com/I was able to delete about 10 modules and macros from AHP that I was using for flags and triggers because my perl program is able to do all of that in one program.
The only downside is that the PC must be running, but then again, it has to be running to take snapshots and send emails anyway.