Joined: 31 Oct 2008 Posts: 353 Location: Milano,Texas
Posted: Sat Feb 21, 2009 2:44 pm Post subject: Search For Text Vb.net
ok i want to make a var scanner for flash games and i want to do this
Flash.GetVariable(Text)
i dont know if that will work but i want to seach for _root.Text how would i do that or is there a faster way.
Joined: 24 Dec 2007 Posts: 2276 Location: Minnesota
Posted: Sat Feb 21, 2009 5:02 pm Post subject:
... For vb.net
'flash' is your flash object
'textbox1' is your textbox to scan variables from line by line.
'textbox2' is the textbox that will return variables that are real.
Code:
Dim i = 0 'use this variable to remember the current line in textbox 1'
Dim current = "" 'use this to record current value in line.'
Me.TextBox1.Text = Me.TextBox1.Text
Do Until i = Me.TextBox1.Lines.Length
If i = 0 Then
current = Me.TextBox1.Text.Split(vbCrLf)(i).Substring(0)
Else
current = Me.TextBox1.Text.Split(vbCrLf)(i).Substring(1)
End If
On Error GoTo x
Me.flash.GetVariable(current)
Me.TextBox2.Text &= current & vbCrLf
x:
i += 1
Loop
Quote:
I suppose
Do you want to use the getvariable command? then do this
Code:
on error goto x
Flash.GetVariable("_root.text")
call msgbox("Variable Exists!")
x:
exit sub
or
Code:
on error goto x
Flash.GetVariable(me.textbox1.text)
call msgbox("Variable Exists!")
x:
exit sub
Joined: 24 Dec 2007 Posts: 2276 Location: Minnesota
Posted: Sat Feb 21, 2009 5:54 pm Post subject:
umm then I'll replace a couple of things.
Code:
dim output as string=""
dim input as string="variable1" & vbcrlf & "variable2" & vbcrlf
Dim i = 0 'use this variable to remember the current line in textbox 1'
Dim current = "" 'use this to record current value in line.'
Do Until i = Me.TextBox1.Lines.Length
If i = 0 Then
current = input.Split(vbCrLf)(i).Substring(0)
Else
current = input.Split(vbCrLf)(i).Substring(1)
End If
On Error GoTo x
Me.flash.GetVariable(current)
output &= current & vbCrLf
x:
i += 1
Loop
call msgbox(output)
You need to put vbcrlf after each variable name in the input text.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum