 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Gspot Guest
|
Posted: Tue Jul 12, 2005 3:09 pm Post subject: confirm with wingettext??? |
|
|
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
 |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Tue Jul 12, 2005 3:15 pm Post subject: |
|
|
| AHY? |
|
| Back to top |
|
 |
daonlyfreez
Joined: 16 Mar 2005 Posts: 949 Location: Berlin
|
Posted: Tue Jul 12, 2005 3:31 pm Post subject: |
|
|
AutoHotkeyYear2k-compliant?
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 1 • mirror 2 • mirror 3 • ahk4.me • PM or  |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Jul 12, 2005 3:38 pm Post subject: |
|
|
AutoHotkey |
|
| Back to top |
|
 |
Gspot Guest
|
Posted: Tue Jul 12, 2005 3:47 pm Post subject: |
|
|
| 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
|
Posted: Tue Jul 12, 2005 7:23 pm Post subject: |
|
|
Sorry, you are right. You should take a closer look at aText
C'mon, you can get it from here
Not-logged-in-daonlyfreez |
|
| Back to top |
|
 |
Gspot Guest
|
Posted: Wed Jul 13, 2005 9:57 am Post subject: |
|
|
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
|
Posted: Wed Jul 13, 2005 1:11 pm Post subject: |
|
|
| 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 |
|
 |
Belial
Joined: 26 Jun 2005 Posts: 40 Location: Portugal
|
Posted: Sat Jul 16, 2005 12:07 am Post subject: |
|
|
ANY = AutoHotkey YAYY
^^ _________________ Belial |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|