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
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
Skip,
Just traded in my old subtlety...
for a NUANCE!
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,
Just traded in my old subtlety...
for a NUANCE!
RE: Documentation about the attachmate functions and methods
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,
Just traded in my old subtlety...
for a NUANCE!
RE: Documentation about the attachmate functions and methods
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
CODE
then declare your object
CODE
Below is How i declare my sessions and set MyOIA
CODE
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
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
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,
Just traded in my old subtlety...
for a NUANCE!
RE: Documentation about the attachmate functions and methods
guess it just depends on how you want to build it