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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extra! ActiveX Component

Status
Not open for further replies.

Ragnhild

Programmer
Joined
Feb 24, 2005
Messages
2
Location
SE
I am using the Attachmate EXTRA! Object Library to communicate with Extra! from C#.

Opening sessions and sending/reading characters works fine, but when I try to use functions like WaitForString or WaitForCursor they take a bunch of parameters that Ive never seen in any documentation.

Example:
System.Object WaitForCursor ( System.Int16 Row , System.Object Col , System.Object EndRow , System.Object EndCol , System.Object Page , System.Object Type )

What are EndRow and EndCol and Type for ??
And what is the return value, I cant recieve it as a boolean.
 
The "Wait" objects just pause the code until the string is found. In VB the parameters you've listed are optional. I ususally just use the WaitForString and give at most an X,Y coordinate that tells Extra where to look for the string.

The EndRow and EndCol will allow you to search a specific section of the screen instead of a specific location. I've never used this feature as it seems more difficult and just doesn't have a payoff for your trouble.

calculus
 
*Sigh*
Im still lost.
If someone could show an example of how to use the WaitForCursor method, or any other wait method, in C# I would really appreciate it.

I have tried all different ways that I can think of but I always get 'Invalid cast Exception' or something similar..

Here is one example:
Code:
EXTRA._ScreenWait sw = (EXTRA._ScreenWait) scr.WaitForString("ABC", 1, 1, null, null, null, EXTRA.MatchConstants.xRegExp);
            if (sw.Wait(1000))
                ...
scr being the screen object
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top