Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

Аватара для Sanja Alone

Ищу Человека…


Сообщения: 420
Благодарности: 67

Профиль | Сайт | Отправить PM | Цитировать


DenchikK
Цитата:
идентификации не происходит
Ну, это не проблема В подобной ситуации нужно исп-ть 4-й режим определения окон Opt("WinTitleMatchMode",4).
Можно подождать этого окна вот так:
Код: Выделить весь код
WinWaitActive('')
или так:
Код: Выделить весь код
Do
Sleep ( 200 )
$handle = WinGetHandle ( "classname=#32770" )
Until $handle <> ""
WinActivate ( $handle )
WinWaitActive ( $handle )
P.S. Все это есть в справке по AutoIt. Кстати, именно по этой причине я не включил сией инфы в FAQ.
Процитирую AutoIt.chm:
Цитата:
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.

-------
Sanja Alone's site (ConvRegToAU3, OEsr, RSA, AutoIt скрипты)


Отправлено: 02:26, 08-08-2006 | #269