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 


Search for address help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
ups2000ups
I post too much
Reputation: 0

Joined: 31 Jul 2006
Posts: 2471

PostPosted: Sat May 03, 2008 7:23 am    Post subject: Search for address help Reply with quote

well i was trying to make a program to search for addresses
but i got a problem .....

lets say start address = 00400000 then the program will first search at 00400000 and then just to 4194305

some 1 know why Oo


Code:

procedure TForm1.SearchTimer(Sender: TObject);
var
Val,Address,Stop: integer;
begin
WindowName  :=  FindWindow(nil,PAnsiChar(WindowTitle.text));
ThreadId  :=  GetWindowThreadProcessId(WindowName,@ProcessId);
HandleWindow  :=  OpenProcess(PROCESS_ALL_ACCESS,False,ProcessId);

Address:=strtoint('$'+CurrentAddress.caption); // Get Current Search Address

readprocessmemory(HandleWindow,pointer(Address),@Val,4,NoNeedThisTime); // Search Address
closehandle(HandleWindow);

If Val = strtoint(ValueSearch.text) then   // If Value is right Add Address to CT
CheatTable.items.add(CurrentAddress.caption);

Stop:=strtoint('$'+StopAddress.text);

if Address < Stop then begin
Address:=Address+1;               // <<<<<<<<<<<< the problem should be here ...  even if i set   $1 i get the same problem
CurrentAddress.caption:=inttostr(Address);
end else
Search.enabled:=false;

end;

_________________
dont complain about my english...
1*1 = 2?
Back to top
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Sat May 03, 2008 9:33 am    Post subject: Reply with quote

not sure, but maybe you should have one variable for the number '123' and one for the '$25235' because i dont know if adding 1 and $2 would equal 3, or even $3, just a guess though
_________________
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