• Log in or sign up for an account here: https://www.sythe.org/login

Question...

Visual Basic Matt

Apprentice
Joined
Jan 29, 2008
Sythe Gold
56
Messages
647
Location
Evurar
Discord Unique ID
223154494878253056
Ok,I'm not sure how to do so, so here's my question...

If I has a text with a list of different items,

So basicly what I want is this...
For example...
If there was a text like this below
Code:
Show-MyUsername
But the program wants to add to the list the information after,
"Show-" Then, add the text after that to the list...
Another example would be...
Code:
Prompt[Information]
Adding to the list whats in between the "[" and the other "]"

Thanks, I take all the help I can get, I really appreciate it.
 
Well here are a couple of methods I just free handed, I don't have vb on this system, but this should get you started

Code:
Private Function ExtractShow(sText as string) as string
Dim Pos as integer

Pos=instr(1,sText,"Show-")+5

ExtractShow=Mid(sText,Pos)
End Function

Here is for prompt
Code:
Private Function ExtractPrompt(sText as string) as string
Dim Pos(1) as integer

Pos(0)=instr(1,sText,"Prompt(")+7
Pos(1)=instr(pos(0),sText,")")

ExtractPrompt=Mid(sText,pos(0),pos(1)-pos(0))
End Function
 
For the record, I tested both functions on my system and both work fine.
 
duelarena.gg
Back
Top