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 


question

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Meeman
Advanced Cheater
Reputation: 0

Joined: 15 Nov 2007
Posts: 54

PostPosted: Sat Jan 12, 2008 9:12 pm    Post subject: question Reply with quote

hey guys,

just a quick question:

i want to search a shockwave flash that i load into a form and then get the values of multiple variables in a list box.

If you dont understand i want to have a list box that when a button is clicked it will find the value to the shockwave flash's variables score, health and nickname. Whats the code to have it get all these variables and post the values in a listbox?

the code can be in VB, C# or Delphi since i'm pretty familiar with each

thanks

-MEEMAN666

_________________
I AM MEEMAN666!!!!!!!!!!

PPT277


programming languages i use: VB6, Delphi 7 , C# 2008, Python

You want to +Rep me!!!!!!!
Back to top
View user's profile Send private message AIM Address
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Wed Jan 16, 2008 4:30 pm    Post subject: Re: question Reply with quote

Meeman wrote:
hey guys,

just a quick question:

i want to search a shockwave flash that i load into a form and then get the values of multiple variables in a list box.

If you dont understand i want to have a list box that when a button is clicked it will find the value to the shockwave flash's variables score, health and nickname. Whats the code to have it get all these variables and post the values in a listbox?

the code can be in VB, C# or Delphi since i'm pretty familiar with each

thanks

-MEEMAN666

So u want the program to automatically find the variables? Well that ain't possible unless you debug the movie.
If you on the other hand allready got the variables then you can use get variable thing.
Code:
text1=ShockwaveFlash1.GetVariable ("tönt")[

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Jan 16, 2008 11:07 pm    Post subject: Reply with quote

Loop through the list and poll the flash object with each object. You can loop the list items by doing something like:

Code:
Private Sub Command1_Click()
    Dim x As Long
   
    For x = 0 To (List1.ListCount - 1)
        MsgBox List1.List(x)
    Next x
End Sub


Which will msgbox each items string. Just for example.

In turn you can make a poll function to request the data from the flash object. If the GetVariable function fails, it usually means the variable does not exist in the flash object. So be sure to add error handling or the program will crash. So you can do something like:

Code:
Private Function GetVar(strVar As String) As String
On Error GoTo ErrHand
    Dim strReturn As String
    ShockwaveFlash1.GetVariable strVar
    GetVar = strReturn
    Exit Function
ErrHand:
    GetVar = ""
End Function


Then inside your loop you would use something such as:

Code:
Private Sub Command1_Click()
    Dim x As Long
   
    For x = 0 To (List1.ListCount - 1)
        Text1.Text = GetVar(List1.List(x))
    Next x
End Sub



Change Text1.Text to what ever you want to store the var, and make an array of textboxes if you want more then one.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Thu Jan 17, 2008 2:12 am    Post subject: Reply with quote

Wiccaan wrote:
Loop through the list and poll the flash object with each object. You can loop the list items by doing something like:

Code:
Private Sub Command1_Click()
    Dim x As Long
   
    For x = 0 To (List1.ListCount - 1)
        MsgBox List1.List(x)
    Next x
End Sub


Which will msgbox each items string. Just for example.

In turn you can make a poll function to request the data from the flash object. If the GetVariable function fails, it usually means the variable does not exist in the flash object. So be sure to add error handling or the program will crash. So you can do something like:

Code:
Private Function GetVar(strVar As String) As String
On Error GoTo ErrHand
    Dim strReturn As String
    ShockwaveFlash1.GetVariable strVar
    GetVar = strReturn
    Exit Function
ErrHand:
    GetVar = ""
End Function


Then inside your loop you would use something such as:

Code:
Private Sub Command1_Click()
    Dim x As Long
   
    For x = 0 To (List1.ListCount - 1)
        Text1.Text = GetVar(List1.List(x))
    Next x
End Sub



Change Text1.Text to what ever you want to store the var, and make an array of textboxes if you want more then one.

List1.ListCount - 1?

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Thu Jan 17, 2008 10:34 pm    Post subject: Reply with quote

The list count returns the number of "true" items in the list, not starting with 0. However, List1.List( <item number> ) starts with 0. If you do 0 to ListCount you will get an error due to it attempting to get an item that doesn't exist in the list.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
stealthy17
Expert Cheater
Reputation: 0

Joined: 10 Apr 2007
Posts: 144
Location: The Netherlands

PostPosted: Fri Jan 18, 2008 2:34 am    Post subject: Reply with quote

http://forum.cheatengine.org/viewtopic.php?p=1895952&sid=dde18aa7916dfe542cc124877317baa4

Is this what you're looking for?
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
Page 1 of 1

 
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