para Posted January 21, 2005 Share Posted January 21, 2005 I am attempting to write a program that will log on to a service, check to see if the account works. If it does, then it will send to a text file that it works, if it doesn't it moves on to the next one. The format of the username and password to check is... Username:Password I figured I could use string split with : being the split point. I read in the manual, and couldn't figure out how to make it into parts. The login is simple, just a screen to log into, 3 parts. Username, Password, Login button. I just need to make it split that from an input box in the gui that the list will be added to, then I want it to use the FIRST part on say... control1 (username box)... So... ControlSend($stringpart1, "", control1) Same with the password just control2 to send it to. Anyone have any suggestions on how to make it do this? -Para Link to comment Share on other sites More sharing options...
para Posted January 21, 2005 Author Share Posted January 21, 2005 Returns an array, the first element ($array[0]) contains the number of strings returned, the remaining elements ($array[1], $array[2], etc.) contain the delimited strings. If no delimiters were found @error is set to 1, the count is 1 ($array[0]) and the full string is returned ($array[1]). Just saw that... Is that what I was looking for? If so... Hows that work, always named $array[1]... or do i make it.... $whatever = StringSpilt(asddafasdfasdfasdfasdfblahblah) Thanks Link to comment Share on other sites More sharing options...
therks Posted January 21, 2005 Share Posted January 21, 2005 $stringSplitOutput = StringSplit('username:password', ':') msgbox(0, 'username', $stringSplitOutput[1]) msgbox(0, 'password', $stringSplitOutput[2]) My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
para Posted January 21, 2005 Author Share Posted January 21, 2005 Thanks. What would I do about a list of about 100? Like... To make it read line 1... split it, and use it. After that, use the next one. I am assuming it will be a simple +1 system. Link to comment Share on other sites More sharing options...
Insolence Posted January 21, 2005 Share Posted January 21, 2005 Read the file into an array, then use UBound and a For loop. "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
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