Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Split Strings To Text boxes

Hello,

So button "browse" will pick the txt files with "email:pass" lines. Then button "Input" will input the "email:pass" data but it will split the string so email goes to first textbox (email). Pass for second textbox (pass). Etc.

[Image: CXjWLMs.png]
textboxemail = textbox.split(":")(0)
textboxpass = textbox.split(":")(1)
(Jan 26, 2015 01:36 PM)Only3 Wrote:  textboxemail = textbox.split(":")(0)
textboxpass = textbox.split(":")(1)

Is that in? Won't it be for each account in listbox1.items?

EDIT: I get errors.
[Image: 4oInSpY.png]

Quite easy, i hope you can go further with this mate.

(0) is the value before the split in this case is (:)
(1) is the value after the split in this case is (:)

Regards.
(Jan 26, 2015 01:37 PM)Xghost7 Wrote:  [Image: 4oInSpY.png]

Quite easy, i hope you can go further with this mate.

(0) is the value before the split in this case is (:)
(1) is the value after the split in this case is (:)

Regards.

Thanks bro, that's what i needed mate. Thanks for the example! How would i use a listbox instead = listbox.items?
(Jan 26, 2015 01:38 PM)NigerianKing Wrote:  Thanks bro, that's what i needed mate. Thanks for the example! How would i use a listbox instead = listbox.items?

The code you're asking for is quite simple.

The snippet below will take a listbox full of combos and split them into two separate listboxes.

[Image: 441dfda31d68d51a670c96edf7bd2a07.png]
(Jan 26, 2015 02:05 PM)Hawk HF Wrote:  [Image: 9v9HNlS.png]

At least someone has sense. There's no point splitting twice.
(Jan 26, 2015 03:05 PM)Odus Wrote:  At least someone has sense. There's no point splitting twice.

if its just one then theres no point to declare
(Jan 26, 2015 03:30 PM)Only3 Wrote:  if its just one then theres no point to declare

You're probably right. It would be a minimal difference if there was one.
When coding it, it just seemed easier to understand. It also allows more room for functionality, such as checking to make sure that there are only two strings in the collection.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by pro_fesnoobSep 24, 2022 04:24 PM 14 796 Sep 24, 2022 04:24 PM
Last Post: BinaryFox
[C#] by KαѕρerJul 17, 2017 08:08 AM 12 695 Jul 17, 2017 08:08 AM
Last Post: 0xDEAD10CC
[Shell] by Mr. RobotApr 30, 2017 03:49 PM 2 188 Apr 30, 2017 03:49 PM
Last Post: Mr. Robot