Hi, I need to read a username, password, and an "application type" ( just a number) from an ini file. How do I set up the inifile? I can't get my script to read from a file i create in notepad and save as an *.ini file.
The script needs to send the user name and password to the application whenever the login window is opened by a piece of connected equipment
Reading from an ini file to automate logon.
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
No time for details right now, but you want to use EditIniFile> command.
Check the Help section for EditIniFile. This will create the file for you if it does not exist. Seach the forum for EditIniFile, ReadIniFile and I am sure you will find samples of creating names and passwords.
Check the Help section for EditIniFile. This will create the file for you if it does not exist. Seach the forum for EditIniFile, ReadIniFile and I am sure you will find samples of creating names and passwords.
Last edited by Bob Hansen on Tue Aug 30, 2005 2:58 am, edited 2 times in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
If you want to read from an Ini file use ReadIniFile and create the ini file to look something like this:
[data]
username=theusername
password=thepassword
apptype=2
Then to read this in:
ReadIniFile>c:\..\inifile.ini,data,username,username
ReadIniFile>c:\..\inifile.ini,data,password,password
ReadIniFile>c:\..\inifile.ini,data,apptype,apptype
The data is now in variables username, password and apptype.
[data]
username=theusername
password=thepassword
apptype=2
Then to read this in:
ReadIniFile>c:\..\inifile.ini,data,username,username
ReadIniFile>c:\..\inifile.ini,data,password,password
ReadIniFile>c:\..\inifile.ini,data,apptype,apptype
The data is now in variables username, password and apptype.
MJT Net Support
[email protected]
[email protected]