Hi All
I have created a vb script in PCOMM which logs on and pulls back data from an AS400. What I want it to do is to take data from an ini file which contains the username and password to logon.
Here is the ini:
[Logon_Details]
userid=user1
password=password1
My code is below
How do I do it??
This has been confusing me for a while.
If possible aswell csn you show me how to write back to the ini aswell?
All help and advise is appreciated
Many Thanks
Tim
I have created a vb script in PCOMM which logs on and pulls back data from an AS400. What I want it to do is to take data from an ini file which contains the username and password to logon.
Here is the ini:
[Logon_Details]
userid=user1
password=password1
My code is below
Code:
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)
dim struserid, strpassword
REM This line calls the macro subroutine
subAWDPrty_
sub subAWDPrty_()
Dim Strinput
autECLSession.autECLOIA.WaitForAppAvailable
rem strInput = InputBox ( "Please enter your user ID", "User ID")
rem autECLSession.autECLPS.SendKeys strInput
autECLSession.autECLPS.SendKeys [COLOR=#ff0000] USERID VARIABLE FROM INI [/color]
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[TAB]"
rem strInput = InputBox ( "Please enter your password ", "Password")
rem autECLSession.autECLPS.SendKeys strInput
[COLOR=#ff0000] autECLSession.autECLPS.SendKeys PASSWORD VARIABLE FROM INI [/color]
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[ENTER]"
autECLSession.autECLOIA.WaitForInputReady
How do I do it??
This has been confusing me for a while.
If possible aswell csn you show me how to write back to the ini aswell?
All help and advise is appreciated
Many Thanks
Tim