Jump to content

spy sweeper why wont this work


Recommended Posts

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

From help

WinWait ( "title" [, "text" [, timeout]] )

Parameters

title The title of the window to check.

text [optional] The text of the window to check.

timeout [optional] Timeout in seconds

From your script:

$handle = 'classname=TPanel2'
WinWait("Webroot Spy Sweeper ", $handle)

the second parameter should be text from the window, not a classname

From the help file for Advanced mode on WinTitleMatchMode

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"

    "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 window

Note: 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 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

I tryied it with

WinWait($handle) and

WinWait($handle, "Webroot Spy Sweeper " ) still no luck

From help

From your script:

$handle = 'classname=TPanel2'
WinWait("Webroot Spy Sweeper ", $handle)

the second parameter should be text from the window, not a classname

From the help file for Advanced mode on WinTitleMatchMode

<{POST_SNAPBACK}>

Link to comment
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
 Share

  • Recently Browsing   0 members

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