Trouble hiding window automation

6 posts in this topic

Disco Stu 0

I've written a script to automate a windows program but I cant seem to find a way to hide all of the file navigation mouse jiggery pokery which takes place before the program launches. SplashScreeOn stops the windows I'm working with being active and prevents the mouseclicks from being registered by the windows behind the splashscreen its starting to do my head in!.

Is there something I'm overlooking here or will I have to put up with watching the window automation?

Share this post

Link to post

Share on other sites

Fossil Rock 2

If you're moving the mouse around to click buttons and such, there are much easier ways ... check out ControlCommand, ControlFocus and MouseClick in the help file or search the forum.

These will allow you to do most, if not all, of the things moving the mouse can do without actually moving the mouse. I think it will be considerably faster too, to the point it'll happen so fast you won't realize it's finished.

Share this post

Link to post

Share on other sites

Disco Stu 0

If you're moving the mouse around to click buttons and such, there are much easier ways ... check out ControlCommand, ControlFocus and MouseClick in the help file or search the forum.

These will allow you to do most, if not all, of the things moving the mouse can do without actually moving the mouse. I think it will be considerably faster too, to the point it'll happen so fast you won't realize it's finished.

I've used ContolCommand, ControlFocus etc. before in another script which has a splashscreen so I know how they work but unfortunately the only way I can control this particular application is using MouseClick. I've checked the app using AU3info tool but non of the items in the drop down I'm trying to access appear in the AU3info tool and even when one is selected you cant use the keyboard to move up and down the list or select items. The only thing it responds to is a double mouse click over the required item.

I'm pretty confident the method I'm using (MouseClick) is the only way to do it but if I'm correct it requies the window to be active which is why (I think) I cant use a standard splashscreen to hide the application.

The code is on my home PC so I cant post it right now but I will post it if people think it will help. Is it possible to either make the window completely transparent removing the need to hide it or to have an active window behind a splashscreen? I know they are more questions but the same question as my first really!

Share this post

Link to post

Share on other sites

Disco Stu 0

1. AutoIt isn't MultiThreaded, so doing 2 functions at one time (ie... Splash Screen and registering MouseClicks) isn't that easy.

2. You can use methods like AdlibEnable() or /AutoIt3ExecuteLine/Script to possible accomplish the above (/AutoIt3Execute* is like running another script)

3. Are you trying to automate an installation? If so, does the application have a /s slient switch?

Bit of background: I'm trying to automate an app that dosent support commandline use but one which I need to run from commandline. Ive got it working as I want it (running and sending switches via commandline to select the items I want) but I would like to tidy it up by hiding the automation behind a splashscreen.

I just tried AdlibEnable to detect the mouse x coordinate (y is always the same) activate the GUI window momentarily and click the mouse before splashing the screen again. Is that what you had in mind? I think it will probably suffice for my needs. The splash screen dropout is not quite Hong Kong Phooey but its quick enough not to be anoying.