G
Guest
I have the following VB script that I have recorded from a terminal session
at work. I wish to use this in a VBA script to manipulate the terminal to
action a repeated number of tasks to extract data and store in Excel. The
example below enters a bit of text and then actions the [enter] key.
I know I can use SendKeys and the like but the [enter] key throws up some
problems through SendKeys as the terminals I use don't always recognise the
[enter] passed by SendKeys.
Any suggestions on how I could change the format of the script below to work
within VBA would be much appreciated.
Cheers
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=testVB
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)
REM This line calls the macro subroutine
subSub1_
sub subSub1_()
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "12345ABCDE"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
end sub
at work. I wish to use this in a VBA script to manipulate the terminal to
action a repeated number of tasks to extract data and store in Excel. The
example below enters a bit of text and then actions the [enter] key.
I know I can use SendKeys and the like but the [enter] key throws up some
problems through SendKeys as the terminals I use don't always recognise the
[enter] passed by SendKeys.
Any suggestions on how I could change the format of the script below to work
within VBA would be much appreciated.
Cheers
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=testVB
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)
REM This line calls the macro subroutine
subSub1_
sub subSub1_()
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "12345ABCDE"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
end sub