Hi all
I've written an automation process in autohotkey. It takes a file (that's automatically generated elsewhere at 6pm every day), cleans a copy of it up then uses that as a set of inputs to a Windows program that has no ability to be batch-fed data.
It works pretty well -- the file cleanup element does its thing as it should, the Windows program it invokes gets started and the right part of the program opened and the input data fed to it an element at a time, each requiring a little routine of keypresses and mouse clicks. All exactly as intended. I was thoroughly pleased with myself when it worked -- fine-tuning delays between parts of the automated process took some time and when it all came together, I had a great feeling of accomplishment.
So why am I here? Well -- I want it to run on its own, on a virtual PC. But when I set it off automatically (using task scheduler), the only part of the process that happens is the file cleanup and the invocation of the program that's going to be manipulated. Anything that requires the simulation of user interaction with a program just doesn't happen.
I can make guesses why -- there's no desktop being created, no attached screen being written to, things like that, if you're going to issue "click at this pixel" instructions when there's no session being displayed anywhere, that's maybe going to confuse things.
So ... am I trying to do the impossible? Or is there a way to programmatically create the screen, mouse and keyboard that would be there if I'd RDPed to the machine, even though I haven't? Or have I misunderstood the nature of the problem?
(This feels a bit like a version of the "if a tree falls in the forest and there's nobody there to see it" paradox!)