I have minimum knowledge on how to create VBScript. I usually google search, copy and paste code and hope it works.
I'm a graphic designer and I have to create an invoice for certain signs I print.
I recorded a macro in AS400 to log me in and take me to the invoice screen.
At this point I would like to type the quantity and price of the sign.
I'm not sure how to add a user input code into the VBScript. Is this possible?
(Bold sections where I want it to open with a message box prompt)
----------------------------------------------------------------------
[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 "[enter]"
autECLSession.autECLPS.WaitForAttrib 22,4,"00","3c",3,10000
autECLSession.autECLPS.WaitForCursor 22,5,10000
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "09716"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "USER INPUT QUANTITY"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "USER INPUT PRICE"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLPS.WaitForAttrib 9,6,"30","3c",3,10000
autECLSession.autECLPS.Wait 4025
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[pf8]"
autECLSession.autECLPS.WaitForAttrib 22,4,"00","3c",3,10000
autECLSession.autECLPS.WaitForCursor 22,5,10000
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "00997"
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 "guinness st pats"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLPS.WaitForAttrib 14,27,"00","3c",3,10000
autECLSession.autECLPS.Wait 3494
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[pf6]"
autECLSession.autECLPS.WaitForAttrib 22,4,"00","3c",3,10000
autECLSession.autECLPS.Wait 11903
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[pf12]"
autECLSession.autECLPS.WaitForAttrib 21,8,"00","3c",3,10000
autECLSession.autECLPS.Wait 2699
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[pf12]"
autECLSession.autECLPS.WaitForAttrib 4,35,"00","3c",3,10000
autECLSession.autECLPS.Wait 5663
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[pf3]"
autECLSession.autECLPS.WaitForAttrib 22,6,"00","3c",3,10000
autECLSession.autECLPS.WaitForCursor 22,7,10000
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "dp jamiec"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLPS.WaitForAttrib 10,2,"00","3c",3,10000
autECLSession.autECLPS.WaitForCursor 10,3,10000
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "2"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLPS.WaitForAttrib 14,36,"00","3c",3,10000
autECLSession.autECLPS.WaitForCursor 14,37,10000
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "p00202"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLPS.WaitForAttrib 10,2,"00","3c",3,10000
autECLSession.autECLPS.WaitForCursor 10,3,10000
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "1"
end sub
I'm a graphic designer and I have to create an invoice for certain signs I print.
I recorded a macro in AS400 to log me in and take me to the invoice screen.
At this point I would like to type the quantity and price of the sign.
I'm not sure how to add a user input code into the VBScript. Is this possible?
(Bold sections where I want it to open with a message box prompt)
----------------------------------------------------------------------
[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 "[enter]"
autECLSession.autECLPS.WaitForAttrib 22,4,"00","3c",3,10000
autECLSession.autECLPS.WaitForCursor 22,5,10000
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "09716"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "USER INPUT QUANTITY"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "USER INPUT PRICE"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLPS.WaitForAttrib 9,6,"30","3c",3,10000
autECLSession.autECLPS.Wait 4025
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[pf8]"
autECLSession.autECLPS.WaitForAttrib 22,4,"00","3c",3,10000
autECLSession.autECLPS.WaitForCursor 22,5,10000
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "00997"
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 "guinness st pats"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLPS.WaitForAttrib 14,27,"00","3c",3,10000
autECLSession.autECLPS.Wait 3494
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[pf6]"
autECLSession.autECLPS.WaitForAttrib 22,4,"00","3c",3,10000
autECLSession.autECLPS.Wait 11903
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[pf12]"
autECLSession.autECLPS.WaitForAttrib 21,8,"00","3c",3,10000
autECLSession.autECLPS.Wait 2699
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[pf12]"
autECLSession.autECLPS.WaitForAttrib 4,35,"00","3c",3,10000
autECLSession.autECLPS.Wait 5663
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[pf3]"
autECLSession.autECLPS.WaitForAttrib 22,6,"00","3c",3,10000
autECLSession.autECLPS.WaitForCursor 22,7,10000
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "dp jamiec"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLPS.WaitForAttrib 10,2,"00","3c",3,10000
autECLSession.autECLPS.WaitForCursor 10,3,10000
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "2"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLPS.WaitForAttrib 14,36,"00","3c",3,10000
autECLSession.autECLPS.WaitForCursor 14,37,10000
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "p00202"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLPS.WaitForAttrib 10,2,"00","3c",3,10000
autECLSession.autECLPS.WaitForCursor 10,3,10000
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "1"
end sub