Sign in to follow this  
Followers 0
Zaxon

Text detection in SpywareBlaster

4 posts in this topic

I'm trying to automate some of the tasks in SpywareBlaster.

I'm essentially trying to detect states of readiness, since SB:

* loads up some data at start up

* performs an immunization process etc

For those who don't know the program, it essentially loads up, then opens its protection database, the sits idle, ready for mouse clicks.

However, if you examine WinGetText and ControlGetText and even WinGetClassList, the contents are the same at the time the program loads as at the time the program finishes its database load. Essentially, WinGetText contains some hidden comments which aren't displayed on the screen, but none of the text that you can see. ControlGetText returns a blank for every control I interogate, and the WinGetClassList doesn't change at all, since the classes are loaded first, then the database loading takes place (takes 4 seconds, say), and then the original screen remains (minus the loading progress bar).

What I'm trying to do is to wait until the database load takes place, before I issue a mouse click. Currently, it seems impossible to detect when this should take place. I can see text changing to the eye quite clearly, but can't detect it. Window Spy can't detect any change either. From what I can gather, the page consists of some frames, and while it can read that a frame exists, it can't read into the contents...or something like that. According to http://www.autoitscript.com/forum/index.ph...=SpywareBlaster it should be possible. Personally, I haven't been able to read data from the method it suggests in this post (ControlGetText returns blanks only)

I'm using a workaround by either:

* Putting a time delay in allowing the program an estimated time to finish it's tasks. This, however, isn't safe, since if the script fires when your computer is busy, say: defragmenting, Burning CDs, trying to take over the world, what normally takes a second or two can suddenly take 20.

* Continually attempting to click on a button in a loop, and waiting until I detect a resultant screen change from the click

Neither way is ideal. I use the second method, currently, but there're certain things I just can't detect.

Any ideas on how to detect text I can clearly see on the screen but none of the AutoIt functions seem to be able to read?

Share this post


Link to post
Share on other sites



Zaxon,

To automate spywareblaster try using the pixelsearch functions of autoit.

Rgrds,

Basbooz

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

To automate spywareblaster try using the pixelsearch  functions of autoit.

Yep, got that to work. I found it very fiddly however, and found my "keep clicking until you get the result you expect" approach far quicker to code.

I did use the pixelsearch on the final step, where I didn't have any more clicking to do, and it works well.

Is this the harsh reality, though: that with some programs that appear to display basic text - like SpywareBlaster - you just can't actually hook into them to read that text?

Edited by Zaxon

Share this post


Link to post
Share on other sites

Is this the harsh reality, though: that with some programs that appear to display basic text - like SpywareBlaster - you just can't actually hook into them to read that text?

<{POST_SNAPBACK}>

Unfortunately yes. There are some workarounds, like you've found. But if the window spy can't see it, neither can AutoIt. I have the same problem with my AS400 emulators. They're essentially telnet sessions that act like a DOS box. Unreadable until I scrape the screen by putting the entire buffer into the clipboard.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

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