AutoHotkey Community

It is currently May 26th, 2012, 7:21 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: July 12th, 2005, 4:09 pm 
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
:D


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 12th, 2005, 4:15 pm 
AHY?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 12th, 2005, 4:31 pm 
Offline

Joined: March 16th, 2005, 10:33 pm
Posts: 969
Location: Frisia
AutoHotkeyYear2k-compliant? :P

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)

_________________
Image mirror 1mirror 2mirror 3ahk4.me • PM or Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 12th, 2005, 4:38 pm 
BoBo wrote:
AHY?


AutoHotkey


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 12th, 2005, 4:47 pm 
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.....


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 12th, 2005, 8:23 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2005, 10:57 am 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2005, 2:11 pm 
Offline

Joined: June 28th, 2005, 7:52 pm
Posts: 69
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 16th, 2005, 1:07 am 
Offline

Joined: June 26th, 2005, 9:43 pm
Posts: 40
Location: Portugal
Quote:
AHY?


ANY = AutoHotkey YAYY

^^

_________________
Belial


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Alpha Bravo, bobbysoon, BrandonHotkey, Cephei1, joetazz, krajan, Miguel, over21, rbrtryn, SKAN and 73 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group