Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alternative for WaitForString function? bec. not working in DotNet

Status
Not open for further replies.

sherryz

Programmer
Jan 25, 2006
1
US
I have a dll that works fine in VB 6.0 using Attachmate Extra that I am now trying to convert to VB.NET. Everything works except for the WaitForString function.

I've seen this problem reported elsewhere but no solution.

Any ideas of how to get it to work or how to use a different function instead. My dll uses WaitForString to check the top left and bottom right of the screen to make sure that the words expected are there - to ensure that the entire screen was painted before it does any scraping, etc.

Any thoughts would be appreciated.

Thanks.
 
I'm currently using the following function in RealBasic due to similar problem with WaitForString If you make improvements please share. The basic logic is grab the whole screen and loop till it changes or timeout. You could modify the location (grab first line and last line ect.) to better suit your needs.
Code:
  Dim temp1 As String
  Dim cnt As integer

  temp1=IDRS.Area(1,1,24,80,0,3).value
  IDRS.sendkeys ("<TRANSMIT>")
  Do 
             ' add some timer or jump out here in case  
             ' screen never changes
    DoEvents ' This is a hard loop and my pc fan
             ' "helicopters" without the doevents
  loop until temp1<>IDRS.Area(1,1,24,80,0,3).value
It may also be worth taking a look at the XStatus Property in your Extra help files
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top