How to grab text from file with username:password

ibmethatswhoib

Новичок
Регистрация
06.02.2011
Сообщения
42
Благодарностей
0
Баллы
0
So I know how to grab text from a file but I only know how to do it with something with one line like

username

So how do I grab just username for a line that has username:password in it.

Hopefully that's not too confusing. Like if I want to save username and password in username:password format. Then I want to grab the username for a username input and password for a seperate field? Any tips?

Thanks
 

ibmethatswhoib

Новичок
Регистрация
06.02.2011
Сообщения
42
Благодарностей
0
Баллы
0
another quick question. How come I have one field passwords that saves to a text file but has a space on top. All the other ones I save to a notepad file are on the first line but this certain one has a space for the first line of the notepad.
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
834
Баллы
113
{-String.Split-|-username:password-|-:-|-0-} -username
{-String.Split-|-username:password-|-:-|-1-} -password
 
  • Спасибо
Реакции: ibmethatswhoib

player

Client
Регистрация
06.06.2011
Сообщения
154
Благодарностей
16
Баллы
0
So I know how to grab text from a file but I only know how to do it with something with one line like

username

So how do I grab just username for a line that has username:password in it.

Hopefully that's not too confusing. Like if I want to save username and password in username:password format. Then I want to grab the username for a username input and password for a seperate field? Any tips?

Thanks
Something like that should help:

{-String.Split-|-{-File.GetString-|-\Resources\-|-0-|-false-}-|-:-|-0-}

1. files and directories --> take a line from the file

+

2. strings processing --> split
 
  • Спасибо
Реакции: ibmethatswhoib

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)