Jump to content

prevent window to appear or make it appea beyond screen borders


Recommended Posts

Hi guys, this is the first post here on the forums so bear with me.

I have a program that before starting issues an annoying popup window which I must click OK and then it dissapears.

I used autoit with winwait() and send enter to it so it is done automatically.

But it is still annoying and I'd like either to prevent it to show on the screen (@SW_HIDE doesn't do anything here) or start the program beyond the border of the screen (like in a virtual attached monitor or a virtual desktop).

I have no idea how to implement this. Can you help me here?

My script looks like:

Run("program.exe", "", @SW_HIDE)

WinWait("This program")

Send("{ENTER}")

Link to comment
Share on other sites

Try using WinMove() along with AutoItSetOption("WinTitleMatchMode",2) at the top of your script.

The AutoItSetOption thing allows you to match your window using some substring of the program youre looking at.

I tried this on my video player and told it to move it somewhere way off where my screen displays and that seems to work.

Link to comment
Share on other sites

Actually I'd like to catch the window before it's drawn on the screen, or to transmit to the program to place it from the start beyond the border (to somehow set a big value for the x,y coordinates the program uses as origin for drawing the window on the screen).

The problem with WinMove is that I still have to use the WinWait for the window to actually exist on the screen before I can close it or move it, and that makes it blink on the display, which is annoying.

Link to comment
Share on other sites

Unfortunately I personally have run out of ideas then. In most cases a user won't even notice or care about said momentary blink, but I suppose if it's for your own personal use only that's different.

At least it beats nothing? ;)

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...