×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Documentation about the attachmate functions and methods

Documentation about the attachmate functions and methods

Documentation about the attachmate functions and methods

(OP)
Hi all,

I'm developper in france.
I develop VBA macros to pilot Attachmate Myextra.

I despair to find any documentation about the funtions and methods that communicate with Myextra like:

Screen.waitforstring() => what are the arguments ?
or
What means the different values of OIA.Status
or
What means the different values of OIA.errorstatus
or
Screen.getstring

Could anybody help me ?

Thanks a lot

RE: Documentation about the attachmate functions and methods




Quote (Extra!HELP):

WaitForString Method
<Related Topics> <Example>

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,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

RE: Documentation about the attachmate functions and methods



Out of curiosity, where are you putting the results and where is your source criteria, if any?  Many users drive their screen scrapes from Excel lists and put their results in Excel.  If so, I would strongly recommend writing your scrape application IN EXCEL VBA.  For me, at least, it is much easier to write in Excel VBA and access the Attachmate!Extra objects than the other way around. But that shows my prejudice.

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

RE: Documentation about the attachmate functions and methods

(OP)
Hi.
Thanks for the quote of MyExtra Help. But i Can't find those informations on "help" of my Myextra. What is the path you use to find it in myextra ? Or do you have any document ?

I'm very interested in the exact description of OIA.Xstatus.

To answer your question: I write in Excel VBA, everything is driven from here. Don't worry !

Thanks again

RE: Documentation about the attachmate functions and methods



Do you have Tools > References set, in the Excel VB Editor, for the Attachmate Extra! n.m Object Library, which is in C:\Program Files\E!PC\extra.tlb.

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

RE: Documentation about the attachmate functions and methods

OIA Description       OIA Value
xNO_STATUS             0
xINVALID_NUM           1
xNUM_ONLY           2
xPROTECTED_FIELD       3
xPAST_EOF           4
xBUSY                   5
xINVALID_FUNC           6
xUNAUTHORIZED_PRINTER  7
xSYSTEM                   8
xINVALID_CHAR           9

Property Xstatus As Integer    
Member of EXTRA.ExtraOIA    
Returns the status of the XCLOCK    

In summary, it allows you to check the status of the session against some constants.  I dont have a functional example of this in code but when I do I will post. As I hear and have experienced today, the WaitHostQuiet function is kinda messy so im replacing it in all my macros with the xStatus checks :)

RE: Documentation about the attachmate functions and methods

Place this statement at the very top of the code

CODE

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

then declare your object

CODE

Dim MyOIA As Object

Below is How i declare my sessions and set MyOIA

CODE

    Set System = CreateObject("EXTRA.System")
        If (System Is Nothing) Then
            MsgBox "Could not create the EXTRA System object. Stopping Macro Playback."
            Stop
        End If
    Set Sessions = System.Sessions
        If (Sessions Is Nothing) Then
            MsgBox "Could not create the Sessions collection object.  Stopping macro playback."
            Stop
        End If
        If (g_HostSettleTime > System.TimeoutValue) Then
            System.TimeoutValue = g_HostSettleTime
        End If
    'userSess is the name of the User Specified Session
    Set Sess0 = System.Sessions(userSess)
        If (Sess0 Is Nothing) Then
            MsgBox "Could not create the Session object.  Stopping macro playback."
            Stop
        End If
        If Not Sess0.Visible Then Sess0.Visible = True
        Sess0.Screen.WaitHostQuiet (g_HostSettleTime)
    
        Set MyOIA = Sess0.Screen.OIA

How I call My_WaitHostQuiet instead of the default extra WaitHost

CODE

            If My_WaitHostQuiet(MyOIA) = True Then
                tpxScreenTest = Sess0.Screen.Area(1, 25, 1, 27).Value
            Else
                MsgBox ("Could not move to the next screen :( ")
            Exit Sub
            End If

The function that performs the 'waiting'

CODE

Public Function My_WaitHostQuiet(ByVal MyOIA As Object) As Boolean
    Dim nClockStatus As Integer
        Sleep (50)
        nClockStatus = 1
        nClockStatus = MyOIA.XStatus
        
        Do While (nClockStatus <> 0)
            Sleep (50)
            nClockStatus = MyOIA.XStatus
        Loop
        
           My_WaitHostQuiet = True
        
End Function

hope this is helpful to all who need it

 

RE: Documentation about the attachmate functions and methods




The way that I have solved the asynchronous issue is to Move the cursor away from the screen's return coordinates, Send the key, loop until WaitForCursor at the screen's return coordinates.

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

RE: Documentation about the attachmate functions and methods

As always, there is more than one way to do the same thing
guess it just depends on how you want to build it

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close