anwebservices 5 Posted August 21, 2015 Report Share Posted August 21, 2015 Hey guys. I bumped in small problem and need some help. I was building the bot to check some accounts on some portal and there was problem with $list from file! my usernames and passwords are in format of:username:password All working fine, BUT if i have account where username and password are the same value, it reads only username and nothing after that or delimiter. What can i do to fix this and get username and password on each account even if they are same value? Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted August 21, 2015 Report Share Posted August 21, 2015 if you are putting them is a list (un and pw) you rill need to change advance setting to don't delete add list to list(%u n p,%something,"Don\'t Delete","Global") ^^^^ otherwise, if you provide a snippet of code one could see exactly what the issue may be CD 1 Quote Link to post Share on other sites
HelloInsomnia 1103 Posted August 21, 2015 Report Share Posted August 21, 2015 You need to add them to another list and split them by : as the delimiter, here is an example: clear list(%accounts) comment("I\'m just adding this here for the example but you can use list from file") add list to list(%accounts,$list from text("username:password",$new line),"Delete","Global") divider comment("Code below is relevant to your issue") clear list(%cur_account) comment("Set : as the delimited to split the username and password") add list to list(%cur_account,$list from text($next list item(%accounts),":"),"Delete","Global") set(#username,$list item(%cur_account,0),"Global") set(#password,$list item(%cur_account,1),"Global") 1 Quote Link to post Share on other sites
anwebservices 5 Posted August 21, 2015 Author Report Share Posted August 21, 2015 Thank you guys for your time. I fixed it other way around, but this must be some bug. Everything is working just fine except when i have line like value:value, then data after delimiter just doesn't exist. In case value:value2 or any other, everything is fine... So what i done is, i added extra characters to every line (like xyz22) then after use set > $replace xyz22 with nothing and i have it working Funny way arround but it works LOL Quote Link to post Share on other sites
anwebservices 5 Posted August 21, 2015 Author Report Share Posted August 21, 2015 Actually Code Docta was right, after i changed advanced settings to "Don't delete" everything is fine bugger me i totally forgot about it. Thanks Docta Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.