| View previous topic :: View next topic |
| Author |
Message |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Sun Mar 16, 2008 10:25 am Post subject: Vb searchin variable |
|
|
i've got a changing variable but the most of it is alwys the same
so how could i make VB searchs a variable when i know the last part of it is:
battle.aBuilding.9.player.aResource[0]
?
help pls
_________________
|
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Sun Mar 16, 2008 10:27 am Post subject: |
|
|
| I don't understand you question?
|
|
| Back to top |
|
 |
Haxory' Grandmaster Cheater Supreme
Reputation: 92
Joined: 30 Jul 2007 Posts: 1900
|
Posted: Sun Mar 16, 2008 10:42 am Post subject: |
|
|
so you mean
battle.aBuilding.9.player.aResource[0]
changes????
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel |
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Sun Mar 16, 2008 10:56 am Post subject: |
|
|
_root.null.instance22.battle.aBuilding.9.player.aResource[0]
that changes and not only 0-100 or sth i also got numbers like 7554
_________________
|
|
| Back to top |
|
 |
Pseudo Xero I post too much
Reputation: 0
Joined: 16 Feb 2007 Posts: 2607
|
Posted: Sun Mar 16, 2008 10:58 am Post subject: |
|
|
Brute-forcing.
_________________
| haxory' wrote: | can't VB do anything??
windows is programmed using VB right? correct me if im wrong.
so all things in windows you have like the start menu is a windows form too. |
|
|
| Back to top |
|
 |
Haxory' Grandmaster Cheater Supreme
Reputation: 92
Joined: 30 Jul 2007 Posts: 1900
|
Posted: Sun Mar 16, 2008 11:08 am Post subject: |
|
|
VB6
| Code: | Private Sub Command1_Click()
For x = 1 To 50000
On Error Resume Next
Label1.Caption = Flash.GetVariable("_root.null.instance" & x)
Next x
End Sub |
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel |
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Sun Mar 16, 2008 11:43 am Post subject: |
|
|
| haxory' wrote: | VB6
| Code: | Private Sub Command1_Click()
For x = 1 To 50000
On Error Resume Next
Label1.Caption = Flash.GetVariable("_root.null.instance" & x)
Next x
End Sub |
|
the last part is important much variables start like that
| Code: | Private Sub Command1_Click()
For x = 1 To 50000
On Error Resume Next
Label1.Caption = Flash.GetVariable("_root.null.instance" & x & ".battle.aBuilding.9.player.aResource[0]")
Next x
End Sub |
will that work?
_________________
|
|
| Back to top |
|
 |
Haxory' Grandmaster Cheater Supreme
Reputation: 92
Joined: 30 Jul 2007 Posts: 1900
|
Posted: Sun Mar 16, 2008 12:01 pm Post subject: |
|
|
| 92Garfield wrote: | | haxory' wrote: | VB6
| Code: | Private Sub Command1_Click()
For x = 1 To 50000
On Error Resume Next
Label1.Caption = Flash.GetVariable("_root.null.instance" & x)
Next x
End Sub |
|
the last part is important much variables start like that
| Code: | Private Sub Command1_Click()
For x = 1 To 50000
On Error Resume Next
Label1.Caption = Flash.GetVariable("_root.null.instance" & x & ".battle.aBuilding.9.player.aResource[0]")
Next x
End Sub |
will that work? |
in a diffrent button just do
Call Flash.setvariable(Label1.caption & "yourvariable",Text1.text)
so you dont have to scan each time you change a variable
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel |
|
| Back to top |
|
 |
Pseudo Xero I post too much
Reputation: 0
Joined: 16 Feb 2007 Posts: 2607
|
Posted: Sun Mar 16, 2008 12:17 pm Post subject: |
|
|
This should work.
| Code: | On Error Resume Next
For i = 1 to 9999
If len(Flash.GetVariable("_root.null.instance" & i & ".battle.aBuilding.9.player.aResource[0]")) > 0 Then
strVariable = "_root.null.instance" & i & ".battle.aBuilding.9.player.aResource[0]")
End If
Next i |
_________________
| haxory' wrote: | can't VB do anything??
windows is programmed using VB right? correct me if im wrong.
so all things in windows you have like the start menu is a windows form too. |
|
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Sun Mar 16, 2008 9:40 pm Post subject: |
|
|
| Xenophobe wrote: | This should work.
| Code: | On Error Resume Next
For i = 1 to 9999
If len(Flash.GetVariable("_root.null.instance" & i & ".battle.aBuilding.9.player.aResource[0]")) > 0 Then
strVariable = "_root.null.instance" & i & ".battle.aBuilding.9.player.aResource[0]")
End If
Next i |
|
this dont looks that good since i need the variable to set it later
haxory i think what u said wont do what i want^^ since alle the variables begin in same way
i need to know if that will work:
| Code: | Private Sub Command1_Click()
For x = 1 To 50000
On Error Resume Next
Label1.Caption = Flash.GetVariable("_root.null.instance" & x & ".battle.aBuilding.9.player.aResource[0]")
Next x
End Sub |
it should find the right number right?
_________________
|
|
| Back to top |
|
 |
Estx Expert Cheater
Reputation: 0
Joined: 04 Mar 2008 Posts: 172
|
Posted: Mon Mar 17, 2008 3:56 am Post subject: |
|
|
Xenophone's code is more or less perfect for what I assume you need done, he didn't show the declaration for strVariable but that is what will hold your variable name (not the variable data).
E.g.
| Code: | Public strVariable As String
Private Sub Command1_Click()
On Error Resume Next
For i = 1 To 9999
If Len(Flash.GetVariable("_root.null.instance" & i & ".battle.aBuilding.9.player.aResource[0]")) > 0 Then
strVariable = "_root.null.instance" & i & ".battle.aBuilding.9.player.aResource[0]"
End If
Next i
End Sub
Private Sub Command2_Click()
EditVariable strVariable, "somethin"
End Sub
Private Sub EditVariable(varName As String, varValue As String)
Flash.SetVariable varName, varValue
End Sub |
Or is the code you're looking for just something to get the value of that variable? In that case, you can use haxory's, but make sure you exit the loop when it's found, otherwise you'll be wasting a lot of time when the application calls that function.
|
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Mon Mar 17, 2008 9:54 am Post subject: |
|
|
haxorys does nothin..
xenophobs just uses the 9999 (or if i type in 3 the 3) instead of i
@estx: its telling me editvariable is wrong
_________________
|
|
| Back to top |
|
 |
Haxory' Grandmaster Cheater Supreme
Reputation: 92
Joined: 30 Jul 2007 Posts: 1900
|
Posted: Mon Mar 17, 2008 12:40 pm Post subject: |
|
|
just send me the surce and which variable has to be found ill fix it *( i think)
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel |
|
| Back to top |
|
 |
Estx Expert Cheater
Reputation: 0
Joined: 04 Mar 2008 Posts: 172
|
Posted: Mon Mar 17, 2008 8:10 pm Post subject: |
|
|
| What's the Error message? If there is no error message, what's underlined? I wrote that in notepad, but I just checked it in VB6 and it worked fine lol.
|
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Mon Mar 17, 2008 9:10 pm Post subject: |
|
|
| Estx wrote: | | What's the Error message? If there is no error message, what's underlined? I wrote that in notepad, but I just checked it in VB6 and it worked fine lol. |
no error message or sth just what i said and haxory? whole code i use and also the variable i want to find and which part is changing is alrdy posted here i havent mint changing it
_________________
|
|
| Back to top |
|
 |
|