Sriharsha8845 Posted June 5, 2014 Posted June 5, 2014 Hello All, I am new to this auto it and i am trying to automate some thing by using this auto it,My requirement is take the user name and password from the text file and pass it through the application,Just like multiple users login in to the gmail account with different user name and password. Thanks in Advance . Regards Sriharsha
Geir1983 Posted June 5, 2014 Posted June 5, 2014 Vague questions gets you vague answers.. You can use FileRead to read from a file, Send to simulate key presses..
javiwhite Posted June 5, 2014 Posted June 5, 2014 $file = FileOpen(@workingdir & "\user.txt",0) ;Opens the file in the background, So we can access the data $read = FileRead($file) ; Reads the contents of the file. $array = StringSplit($read,":") ; Seperates the contents of the file by the chosen delimiter. (ie, We now have $array[1] as the username and $array[2] as the passwordof the txt file. $username = $array[1] $password = $array[2] Msgbox(0,"User Details","Username: " & $username & @CR & "Password: " & $password) ;Display the result. Play around with the FileOpen and Read commands as Geir said. I personally find that loading contents of a file into an array makes data validation/manipulation far easier. For your reference, Here is the txt file i used in this example jack:jill -Javi give a man an application, and he'll be frustrated for the day, Teach him how to program applications and he'll be frustrated for a lifetime.
November Posted June 5, 2014 Posted June 5, 2014 (edited) Hello All, I am new to this auto it and i am trying to automate some thing by using this auto it,My requirement is take the user name and password from the text file and pass it through the application,Just like multiple users login in to the gmail account with different user name and password. Thanks in Advance . Regards Sriharsha Hi Sriharsha8845, First of all welcome to AutoIT. I advice you to start by gettin familiar to AutoIT in forums, helpfile and lose some hours writing a script., After doing that, post what you tried to script and all AutoIT comunity will help you gladly. For your intent, probably if you give mor details, about aplication (web application, desktop application, etc...) probably we can give you more hints to start scripting. Best of luck and have a nice script day Edited June 5, 2014 by November Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now