Jump to content

WinActivate & WinClose don't work for some windows


Recommended Posts

Guest alicegao
Posted

I have been trying to using some of the window commands of AutItX,

and I have found that WinActivate and WinClose work for one window

in the software and don't work for the other window.

I tried WinExists for the other window and it returns 1, which means

the window should be recognized.

Anyone has ever seen this happening? And is there a possibility

that the implementation of the two windows are somehow different,

so that it interferes with AutoItX?

Thanks in advance,

Alice

Guest alicegao
Posted

I am using tcl to write my script.

The thing is I tried it in the tcl shell, and it doesn't work.

When I do

# assume already created an autoIt object

set win "Some Window"

$autoIt WinActivate $win

then the shell is put into background, but the "Some Window"

is not activated

I also tried the WinClose, but the window just stays there.

It obviously works for another window, because I already

finished my script on that window, because I tried on the

two windows with exactly the same script.

Posted

I had many confounding problems with things like this.

Then I found out you can alter Window's responsiveness to the commands from AutoIt.

Try slowing things down a little with:

Opt ("WinWaitDelay", 375)       ;250 millis default  Orig=375

You can also slow down AutoIt "key presses", useful with "SEND" command.

We run a bunch of cr*ppy old computers here.

J

If I am too verbose, just say so. You don't need to run on and on.

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
  • Recently Browsing   0 members

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