Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Vb searchin variable
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
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

PostPosted: Sun Mar 16, 2008 10:25 am    Post subject: Vb searchin variable Reply with quote

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
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Sun Mar 16, 2008 10:27 am    Post subject: Reply with quote

I don't understand you question?
Back to top
View user's profile Send private message
Haxory'
Grandmaster Cheater Supreme
Reputation: 92

Joined: 30 Jul 2007
Posts: 1900

PostPosted: Sun Mar 16, 2008 10:42 am    Post subject: Reply with quote

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
View user's profile Send private message
92Garfield
I'm a spammer
Reputation: 57

Joined: 20 Dec 2007
Posts: 5871
Location: Banana Republic Germany

PostPosted: Sun Mar 16, 2008 10:56 am    Post subject: Reply with quote

_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
View user's profile Send private message
Pseudo Xero
I post too much
Reputation: 0

Joined: 16 Feb 2007
Posts: 2607

PostPosted: Sun Mar 16, 2008 10:58 am    Post subject: Reply with quote

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
View user's profile Send private message
Haxory'
Grandmaster Cheater Supreme
Reputation: 92

Joined: 30 Jul 2007
Posts: 1900

PostPosted: Sun Mar 16, 2008 11:08 am    Post subject: Reply with quote

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
View user's profile Send private message
92Garfield
I'm a spammer
Reputation: 57

Joined: 20 Dec 2007
Posts: 5871
Location: Banana Republic Germany

PostPosted: Sun Mar 16, 2008 11:43 am    Post subject: Reply with quote

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
View user's profile Send private message
Haxory'
Grandmaster Cheater Supreme
Reputation: 92

Joined: 30 Jul 2007
Posts: 1900

PostPosted: Sun Mar 16, 2008 12:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
Pseudo Xero
I post too much
Reputation: 0

Joined: 16 Feb 2007
Posts: 2607

PostPosted: Sun Mar 16, 2008 12:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
92Garfield
I'm a spammer
Reputation: 57

Joined: 20 Dec 2007
Posts: 5871
Location: Banana Republic Germany

PostPosted: Sun Mar 16, 2008 9:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
Estx
Expert Cheater
Reputation: 0

Joined: 04 Mar 2008
Posts: 172

PostPosted: Mon Mar 17, 2008 3:56 am    Post subject: Reply with quote

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
View user's profile Send private message
92Garfield
I'm a spammer
Reputation: 57

Joined: 20 Dec 2007
Posts: 5871
Location: Banana Republic Germany

PostPosted: Mon Mar 17, 2008 9:54 am    Post subject: Reply with quote

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
View user's profile Send private message
Haxory'
Grandmaster Cheater Supreme
Reputation: 92

Joined: 30 Jul 2007
Posts: 1900

PostPosted: Mon Mar 17, 2008 12:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
Estx
Expert Cheater
Reputation: 0

Joined: 04 Mar 2008
Posts: 172

PostPosted: Mon Mar 17, 2008 8:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
92Garfield
I'm a spammer
Reputation: 57

Joined: 20 Dec 2007
Posts: 5871
Location: Banana Republic Germany

PostPosted: Mon Mar 17, 2008 9:10 pm    Post subject: Reply with quote

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 Wink

_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites