Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Capture screen data by a macro in PCOMM

2,543 views
Skip to first unread message

Jesus Alfonso

unread,
Dec 4, 2002, 1:14:09 PM12/4/02
to
Hello,

We have eNetwork Personal Communication AS/400 (client access express x
windows - P.E.T versión 4.3 - W95/W98/WNT

Does pcomm provide a way to implement a keyboard macro (ie. ALT+F1) that
capture n characters from a specific position in the screen and then calls a
visual basic script with that data as a parameter?

If so, Can you give me an example?

Thanks.


George Duh-bya

unread,
Dec 5, 2002, 7:54:23 AM12/5/02
to
"Jesus Alfonso" <jesus....@wanadoo.es> wrote in
news:aslgla$56ma$1...@news.boulder.ibm.com:

I don't call another vbscript, but I use this to capture data from the
screen then launch a URL with the info included:


[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)

REM This line calls the macro subroutine
subSub1_

sub subSub1_()

DIM Val1, Val2, Val3, Vals

Val1 = autECLSession.autECLPS.GetTextRect(2, 11, 2, 14)
Val2 = autECLSession.autECLPS.GetTextRect(2, 16, 2, 19)
Val3 = autECLSession.autECLPS.GetTextRect(2, 21, 2, 21)
Vals = Val1 & Val2 & Val3

Dim IE
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "about:blank"
Do While IE.Busy
Loop
IE.Visible = True
IE.Navigate "http://BigLongURLTrimmed&FCCSNO=" & Vals

end sub

Bill Holtzhauser

unread,
Dec 9, 2002, 8:38:17 AM12/9/02
to
Hello Jesus,

I asked someone here if they could help, they did not have an example but
suggested the following:

1. Record a very simple macro on PCOMM.
2. This gives you a VBSCRIPT outline that you can modify to perform your
code.
3. The menubar Macro launch facility has an editor that allow you to change
the
code in the recorded macro.
4. The PCOMM default macro mode is "vbscript". It uses the vbscript.dll. And
the
API it uses is: Automation Object API of PCOMM (PCECL.pdf, Chapter
3).
5. That API has a component interface called autECLPS which is a scripting
version of the familiar EHLLAPI.
6. Since PCOMM vbscript macros are actually running in the vbscript.dll
scripting
host, you can also call any VBSCRIPT compatible component library in
the
usual way.
7. So you write one unified script that first uses Automation Objects API
and then
immediately use that screen capture with further VBSCRIPT code.
8. PCOMM has a toolbar button to call up the Remap facility. You map the
macro
name to a particular keystroke (you said ALT+F1).
9. Run the PCOMM emulator session. When you get to the right screen, hit
the ALT+F1. That starts the custom macro. The code will scrape the
screen
and then immediately do some work with it. When the work is
finished, the
macro will stop playing.

Regards,
Bill Holtzhauser
"Jesus Alfonso" <jesus....@wanadoo.es> wrote in message
news:aslgla$56ma$1...@news.boulder.ibm.com...

0 new messages