Jump to content
Sign in to follow this  
Ghost21

WinWait Don't wait for shhh ?

Recommended Posts

Ghost21

Every time I use

Opt("WinTitleMatchMode", 4) with winwait seems like it always hangs on WinWait because I can't use wintitlematchmode 3 ,2 1 because it has to be exactley what I'm looking for or it will not work..

Share this post


Link to post
Share on other sites
evilertoaster

Are you sure you know how to use and are using correctly the advanced mode of WinTitleMatchMode? Post some sample code the reproduces your problem.

Edited by evilertoaster

Share this post


Link to post
Share on other sites
PsaltyDS

Every time I use

Opt("WinTitleMatchMode", 4) with winwait seems like it always hangs on WinWait because I can't use wintitlematchmode 3 ,2 1 because it has to be exactley what I'm looking for or it will not work..

You're probably using it wrong. Post a short demo script that shows your issue, and we can figure it out.

:rolleyes:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
DW1

directly from the help file

Mode 4

Advanced mode.

In this mode special sequences are used in the title parameter so that window classnames and handles can be used. The text parameter remains the same.

The special sequences must contain no whitespace. They are:

"classname=CLASSNAME"

"regexp=REGEXP"

"active"

"last" or ""

"classname=" matches a window based on its classname. For example to identify a window that has the classname "MYCLASS1" then you would use "classname=MYCLASS1" for the title parameter.

"regexp=" matches a window matching REGEXP pattern.

"active" matches the currently active window (same as "" in the default WinTitleMatchMode).

"last" uses the last successful window match so you don't have to keep specifying the title and text again and again. e.g.

AutoItSetOption("WinTitleMatchMode", 4)
WinWaitActive("Untitled - Notepad")
WinClose("last")    ; Closes the previously matched notepad window

Note: If "classname=", "regexp=", "active", "last" or "" are not used as the title then the window matching takes place as in Mode 1 making this a good mode for general use.

Share this post


Link to post
Share on other sites
bogB

that isnt demo...

i dont see whats wrong heare,

winwaitactive is waiting that any window with that title become active, and on activation (mouse click or WinActivate) he close it,

on the first post you whas writing command winwait, so r y waiting the window to exists so that you can close it when he popup, or y r waiting to activate (set focus) on the window with that name so that script can close it?

can you write, what r you trying or what do you need from script todo with notepad window in what moment... and what is happening (what do you think is wrong)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.