Sign in to follow this  
Followers 0
Guest alicegao

WinActivate & WinClose don't work for some windows

6 posts in this topic

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

Share this post


Link to post
Share on other sites



Working fine for me, maybe a typo ?

Show your script so we can see.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Sorry, not familiar with "tcl", I tested in VB amd all is good.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Try using "WinWaitActive" to make sure the window loads before continuing script

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