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!

VB.NET, Attachmate, EXTRA! & WaitForString as Boolean

Status
Not open for further replies.

shaub

Programmer
Nov 21, 2009
1
DK
thread1-1453246

Hi

I am not a VB.NET expert, so if any über geek knows better, please correct me...

While converting VBA to VB.NET I experienced the error "Conversion from type '_ComObject' to type 'Boolean' is not valid." When I use WaitForString. In VBA WaitForString returns a boolean, but in VB.NET WaitForString returns an object. After a while I figured out that you can simply write...

WaitForString("Text", 1, 1).Value in VB.NET to return a boolean. This might be simple, but I just spent half an hour Google'ing to find the answer. Perhaps this will help someone like me Google'ing the same... : )

Simon
 

Simon,

How WERE you using this method in .net?
ExtraVB_Help said:
Applies To Objects

Screen

Description

Waits until the specified text appears on the screen. The Screen object will wait for the amount of time set in System.TimeoutValue.

Syntax

rc = object.WaitForString (Text [,Row [,Col [,Page]]])

-or-

object.WaitForString String [,Row [,Col [,Page]]]

Element Description
rc The return value.
object The Screen object.
String The text string that you want the Screen object to wait for.
Row The row where you expect the string to appear.
Col The column where you expect the string to appear.
Page VT session only -- the screen page.Note: This parameter is ignored for release 6.0 of EXTRA!o.
Return Value Description
TRUE The Screen object has received the text string in the specified location within the time specified by System.TimeoutValue.
FALSE The Screen object has not received the text string in the specified location within the time specified by System.TimeoutValue.
Comments

If you don't specify a screen location (row, column, or page), WaitForString can receive the text string in any location to be successful.

Copyright 1996 - 1999, Attachmate Corporation. All rights reserved.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top