forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Imaging and recognition.. Best way??

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
kc7aad
Contributor
Contributor


Joined: 09 Oct 2005
Posts: 53
Location: Spokane Washington

PostPosted: Tue Oct 18, 2005 8:29 pm    Post subject: Imaging and recognition.. Best way?? Reply with quote

Hi Group...

I am creating a program, Keepalive as I am refering it as, that will do just that. Keep a program running, by checking for it's existance every 120 seconds.
I am trying to create what i think would be and IF statement dealing with this as well, but don't know how or where to start.
I am running a mapping prgram that is used in my AVL System. One of the items on the bottom status bar, is the Auto Locate Status. The two phrases that differ when it is either on or off, are AUTO PING ON, and AUTO PING OFF. There is also an ICON that appears next to this text. I thought about searching the display for the text srting, but it doesn't work. I think it is because it is not a highlightable text. It's not my program, and it's n ot an open source, so I can't really get in a dig around.
I have read a few posts about image recognition, but don't understand how it works.
Anybody have any good clues, or scripts already doing this?? Something that i could use for my app?? I just need some direction, and i think i can make it work. Just don't know where to start!!



Sorry for the long post! Thanks for your help!!
Back to top
View user's profile Send private message Yahoo Messenger
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Tue Oct 18, 2005 9:38 pm    Post subject: Reply with quote

Just off of the top of my head you'll first need to find the correct window.
When you've done that, then you will need to enumerate all of it's child
windows until you find the status bar. I haven't seen this program that you
are referring to, so I cannot give you some pre-defined window class
names as I am unsure as to how the application was written and what
language it was written in. The problem behind this lies in the fact that
most programs now adays are using custom versions of common windows
controls. Because of this the class name cannot be pre-defined as there
would need to be one heck of a data base somewhere to keep track of all
of the different class names. This is an even greater problem is the
programmer of the application is using their own custom controls that are
not derived from a common windows control.

I hope this makes sense.

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Wed Oct 19, 2005 12:11 am    Post subject: Reply with quote

kc7aad,

Following up on Shinobisoft's post, the tool to use to identify the window and its child windows is Windows Spy. It came with VDS, and you can start it from the VDS Tools menu. Hope this gets you started...

Hooligan

_________________
Hooligan

Why be normal?
Back to top
View user's profile Send private message
kc7aad
Contributor
Contributor


Joined: 09 Oct 2005
Posts: 53
Location: Spokane Washington

PostPosted: Wed Oct 19, 2005 6:27 am    Post subject: Reply with quote

ok.. So found all that, but I don't know what I am looking for!! Whe I "SPY" and hover over the area, the computer gets REALLLLLLY SLOOOOOW!!! Never comes back with anything other than the X&Y Coordinates. So do I need to do something with them then??

And even though this is further than I was yesterday... What do I do with that info when I get it??? I was thinking about saving what it is SUPPOSED to look like in a .BMP file, then comparing to to what is current. Is this the right way, and the best way?? Or some other way maybe better??
Back to top
View user's profile Send private message Yahoo Messenger
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Wed Oct 19, 2005 9:09 am    Post subject: Reply with quote

I threw this together, maybe it will give you some ideas how:

Code:
Title Get Window Name

DIALOG CREATE,Get Window Name,-1,0,370,191

DIALOG ADD,STYLE,STYLE1,,12,,,red

DIALOG ADD,TEXT,about2,35,71,,,Get Window Name,,STYLE1
DIALOG ADD,BUTTON,GetWindowName,100,70,114,24,Get Window Name

DIALOG ADD,BUTTON,closenow,152,305,50,24,Close

DIALOG SHOW

:Evloop
wait event
goto @event()

:GetWindowNameBUTTON
info Select the window by clicking on it after pressing OK@CR()You have 4 seconds after pressing OK
wait "4"
%%window_class_name = @winactive(c)
wait "0.1"
%%window_id = @winactive(i)
wait "0.5"
window normal,#%%window_class_name
wait "0.1"
info %%window_class_name@CR()%%window_id
goto Evloop


:closenowBUTTON
:Close
exit
Back to top
View user's profile Send private message Visit poster's website
kc7aad
Contributor
Contributor


Joined: 09 Oct 2005
Posts: 53
Location: Spokane Washington

PostPosted: Thu Oct 20, 2005 5:43 am    Post subject: Reply with quote

OK.. Great little app.. When I click on the section of the program I need to be looking at, it comes back with:
ThunderRT6FormDC
%1311354
So I turned the Pinging ON, and it came back with the same thing. I closed the program, reopened it, tried it again.. And guess what.. IT WAS DIFFERENT!!! Tried it a fe more times, and different everytime!!

AHHHHHHH
Back to top
View user's profile Send private message Yahoo Messenger
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Thu Oct 20, 2005 6:40 am    Post subject: Reply with quote

The constant you need to remember is the controls classname. The window
identifier (handle) changes every time the application is created.

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group