Sign in to follow this  
Followers 0
GlyphMaker

Process Awareness of AutoIt?

3 posts in this topic

I have observed that a process I wish to automate with AutoIt seems to be aware, when the method used to start its execution is something other than a user's mouse click on its screen icon, and that's not so good.

If I mouse-click on a shortcut to the process, or if I invoke it from a command prompt window, it runs normally. If, however, I start the process using the AutoIt Run() command, it's main panel opens normally, but fails to perform certain of its routine functions, when buttons are pushed. In fact it generates an error message. I'm stumped.

One clue as to what may be going on is that the invoked program displays a current date and time in its main window, and, when the program is started by the Run() command or ShellExecute() command in AutoIt, that date is erroneously set to Dec 31, 1969 (which is problematic, not just aesthetic); whereas, when started by conventional means, it has the right date and runs just fine. So, I have to ask, "What gives?"

I assume that without a knowledge of the program I am starting, it will not be possible for another AutoIt user to identify the cause of the problem, however I am interested in any of your educated guesses as to what might be going on. Any ideas? I am thinking along the lines of an argument list or an .ini file name at startup, but I find no clues there, and I don't know what other issues to scope out.

Can anyone comment from similar experience? Thank you.

Share this post


Link to post
Share on other sites



The issue is resolved. There was, as is usually the case, an oversight on my part. I am an awful programmer. The "start in" or "working" directory had not been set in my previous attempts, with consequences described above; so, in fact, my invoked program had no idea where to find its required support files, located in that directory. This is, of course, avoided by the use of a second argument to the Run() command, which I failed to provide. Given the argument - the working directory - the process behaves as it should, and I am mildly embarrassed.

Share this post


Link to post
Share on other sites

I've had strange problems before resulting from the lack of specifying the proper working directory. The wireless clients on one of my computers will fail to show a tray icon, and half the options will be missing in dialogs if the working directory isn't properly set. I problem that took a while to debug.

Which is why when I code I try to make programs resistant to not having the proper working directory.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0