AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

confirm with wingettext???

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Gspot
Guest





PostPosted: Tue Jul 12, 2005 3:09 pm    Post subject: confirm with wingettext??? Reply with quote

I have a routine that works with a program that is not AHY.
At some point apears a window that, if everithing is correct, display several lines, and two of them with the word "acepted".
Is there a way to confirm that, with my routine, perhaps with WinGetText,.... but i haven't the foguest idea about the code!!!!!!!!

Ideas!!!!!!!!!
Thanks
Very Happy
Back to top
BoBo
Guest





PostPosted: Tue Jul 12, 2005 3:15 pm    Post subject: Reply with quote

AHY?
Back to top
daonlyfreez



Joined: 16 Mar 2005
Posts: 949
Location: Berlin

PostPosted: Tue Jul 12, 2005 3:31 pm    Post subject: Reply with quote

AutoHotkeyYear2k-compliant? Razz

WinGetText

Quote:
WinGetText, OutputVar [, WinTitle, WinText, ExcludeTitle, ExcludeText]


So, this would mean, you need to do something like:

Code:
Loop ; - infinite
{
   ; try to get the desired text
   WinGetText, theText, TheTitleOfYourWindow, acepted
   ; if errorlevel is set to 1, there was a problem, in other words, it didn't find it.
   if errorlevel = 0
      break ; - now we did find it
   ; add some 'breath' for the CPU to the loop
   Sleep, 100
}

msgbox, Found it!


untested, and you might need to add/adapt SetTitleMatchMode and DetectHiddenText to get it to find your window(text)
_________________
mirror 1mirror 2mirror 3ahk4.me • PM or
Back to top
View user's profile Send private message
Guest






PostPosted: Tue Jul 12, 2005 3:38 pm    Post subject: Reply with quote

BoBo wrote:
AHY?


AutoHotkey
Back to top
Gspot
Guest





PostPosted: Tue Jul 12, 2005 3:47 pm    Post subject: Reply with quote

Code:
Loop ; - infinite
{
   ; try to get the desired text
   WinGetText, theText, TheTitleOfYourWindow, acepted
   ; if errorlevel is set to 1, there was a problem, in other words, it didn't find it.
   if errorlevel = 0
      break ; - now we did find it
   ; add some 'breath' for the CPU to the loop
   Sleep, 100
}

msgbox, Found it!


--------------------------------------------------------------------------
The problem is that i want to confirm 2 "acepted" (one per line), and how to make a code that doesn't read for example the same acepted 2 times.

If there is only 1 acepted (or none) in that window i want a message error.....
Back to top
Guest






PostPosted: Tue Jul 12, 2005 7:23 pm    Post subject: Reply with quote

Sorry, you are right. You should take a closer look at aText Wink

C'mon, you can get it from here Idea

Not-logged-in-daonlyfreez
Back to top
Gspot
Guest





PostPosted: Wed Jul 13, 2005 9:57 am    Post subject: Reply with quote

The problem is that i want to confirm 2 "acepted" (one per line), and how to make a code that doesn't read for example the same acepted 2 times.

If there is only 1 acepted (or none) in that window i want a message error.....

the words that i want to confirm, are alwais in the same X coordenate (Y is variable)
This can help in the verification of the 2 "acepted" (coordenate verification)


Any Ideas??????????????
Thanks for the help
Back to top
wolfie



Joined: 28 Jun 2005
Posts: 69

PostPosted: Wed Jul 13, 2005 1:11 pm    Post subject: Reply with quote

if it always appears on the same line you can use wingettext to check the line numbers i think you would use wingettext for that at least
Back to top
View user's profile Send private message
Belial



Joined: 26 Jun 2005
Posts: 40
Location: Portugal

PostPosted: Sat Jul 16, 2005 12:07 am    Post subject: Reply with quote

Quote:
AHY?


ANY = AutoHotkey YAYY

^^
_________________
Belial
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group