Jump to content

Trouble hiding window automation


Disco Stu
 Share

Recommended Posts

First post so not too much abuse please!

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?

Link to comment
Share on other sites

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.

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • Moderators

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?

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

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.

Cheers for the gentle shove in the right direction.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...