jessicatech
Programmer
Hi all,
I am writing a macro ( .mac) to be used in IBM Personal Communications 5.7
emulator for AS/400. The macro is to read text
from a text file (MBRID.TXT) and perform a routine in the macro as follow:
*******************************************************************************
***************************
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[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 "3"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
REM *************
REM Maintenance *
REM *************
Open "C:\MBRID.TXT" For Input As #1 ' HITS
HERE!!!!!!!!!!!!!!!!!
While Not EOF(1)
Line Input #1, mbrid
If mbrid <> " " Then
autECLSession.autECLPS.WaitForAttrib 4,27,"00","3c",3,10000
autECLSession.autECLPS.WaitForCursor 4,28,10000
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[mbrid]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLPS.WaitForAttrib 5,46,"00","3c",3,10000
autECLSession.autECLPS.WaitForCursor 5,47,10000
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "Y"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "Free-Text"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
End If
Wend
Close #1
autECLSession.autECLPS.WaitForAttrib 4,27,"00","3c",3,10000
autECLSession.autECLPS.Wait 3114
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[pf3]"
end sub
*******************************************************************************
***************************
However, I hit a run-time error at the following line:
Open "C:\MBRID.TXT" For Input As #1
Error message is "Error on line 23. Expected end of statement. Would you like
to edit script?
The MBRID.TXT file exists in the C drive.
Please advise and Thank you.
I am writing a macro ( .mac) to be used in IBM Personal Communications 5.7
emulator for AS/400. The macro is to read text
from a text file (MBRID.TXT) and perform a routine in the macro as follow:
*******************************************************************************
***************************
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[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 "3"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
REM *************
REM Maintenance *
REM *************
Open "C:\MBRID.TXT" For Input As #1 ' HITS
HERE!!!!!!!!!!!!!!!!!
While Not EOF(1)
Line Input #1, mbrid
If mbrid <> " " Then
autECLSession.autECLPS.WaitForAttrib 4,27,"00","3c",3,10000
autECLSession.autECLPS.WaitForCursor 4,28,10000
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[mbrid]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLPS.WaitForAttrib 5,46,"00","3c",3,10000
autECLSession.autECLPS.WaitForCursor 5,47,10000
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "Y"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "Free-Text"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
End If
Wend
Close #1
autECLSession.autECLPS.WaitForAttrib 4,27,"00","3c",3,10000
autECLSession.autECLPS.Wait 3114
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[pf3]"
end sub
*******************************************************************************
***************************
However, I hit a run-time error at the following line:
Open "C:\MBRID.TXT" For Input As #1
Error message is "Error on line 23. Expected end of statement. Would you like
to edit script?
The MBRID.TXT file exists in the C drive.
Please advise and Thank you.