AntiVirusGuy Posted June 2, 2005 Share Posted June 2, 2005 I am trying to automate a sweep the panel in spy sweeper changes to TPanel2 when the sweep is done I want my script to wait untill that happens and then send an alt-x to hit next. why wont this work Run("C:\Program Files\Webroot\Spy Sweeper\SpySweeper.exe") Sleep(5000) WinActive("Webroot Spy Sweeper ") Send("!s") Sleep(500) Send("!t") AutoItSetOption("WinTitleMatchMode", 4) $handle = 'classname=TPanel2' WinWait("Webroot Spy Sweeper ", $handle) Sleep(1000) Send("!x") Link to comment Share on other sites More sharing options...
GaryFrost Posted June 2, 2005 Share Posted June 2, 2005 (edited) From helpWinWait ( "title" [, "text" [, timeout]] )Parameterstitle The title of the window to check. text [optional] The text of the window to check. timeout [optional] Timeout in secondsFrom your script:$handle = 'classname=TPanel2' WinWait("Webroot Spy Sweeper ", $handle)the second parameter should be text from the window, not a classnameFrom the help file for Advanced mode on WinTitleMatchModeMode 4Advanced 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" "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."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 windowNote: If "classname=", "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. Edited June 2, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
AntiVirusGuy Posted June 2, 2005 Author Share Posted June 2, 2005 I tryied it withWinWait($handle) andWinWait($handle, "Webroot Spy Sweeper " ) still no luckFrom helpFrom your script:$handle = 'classname=TPanel2' WinWait("Webroot Spy Sweeper ", $handle)the second parameter should be text from the window, not a classnameFrom the help file for Advanced mode on WinTitleMatchMode<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now