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 


[Delphi]Trouble Making (More question)

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

Joined: 16 Feb 2006
Posts: 786
Location: Singapore

PostPosted: Sun Feb 22, 2009 12:26 am    Post subject: [Delphi]Trouble Making (More question) Reply with quote

Guys help me yah. +REP to those who help me.
Topic: Auto-Click
1)How to set F1= On and F1=Off..I can only set F1=On and F2=Off...


Last edited by tanjiajun_34 on Sun Feb 22, 2009 2:55 am; edited 2 times in total
Back to top
View user's profile Send private message
iRiot
Master Cheater
Reputation: 0

Joined: 03 Jul 2007
Posts: 395
Location: Aka RIOT

PostPosted: Sun Feb 22, 2009 12:34 am    Post subject: Reply with quote

This will take the number in a text box and set it as the interval of the timer Timer1 being any timer u want and same goes with the edit box and set this code onto a button or anything else to change the timer's interval

Code:
Timer1.Interval := StrToInt (Edit1.Text);


or do something like
Code:
Timer1.Interval := 1000;
or any other number

i believe thats how it goes havn't code in delphi in a while

_________________


Last edited by iRiot on Sun Feb 22, 2009 12:56 am; edited 1 time in total
Back to top
View user's profile Send private message
tanjiajun_34
Grandmaster Cheater
Reputation: 0

Joined: 16 Feb 2006
Posts: 786
Location: Singapore

PostPosted: Sun Feb 22, 2009 12:53 am    Post subject: Reply with quote

So by that we can choose a number for the delay?
Back to top
View user's profile Send private message
iRiot
Master Cheater
Reputation: 0

Joined: 03 Jul 2007
Posts: 395
Location: Aka RIOT

PostPosted: Sun Feb 22, 2009 12:56 am    Post subject: Reply with quote

tanjiajun_34 wrote:
So by that we can choose a number for the delay?


yes just put a number into ur text box and put that code onto a button or w/e and then once u click it it will change the timers interval and to check the timers interval u do


Code:
Label1 := IntToStr (Timer1.Interval);


oh btw for the top codes i gave u it should be := not = lol ill change that right now

_________________
Back to top
View user's profile Send private message
FullyAwesome
I post too much
Reputation: 0

Joined: 05 Apr 2007
Posts: 4438
Location: Land Down Under

PostPosted: Sun Feb 22, 2009 12:57 am    Post subject: Reply with quote

you could always just make the thread sleep for a certain delay, be it the user's choice:
(i don't know delphi so use this as pseudo code)

Code:
thread.sleep(delay)

where delay is obviously an integer value you receive from a textbox/slider, whatever you want to use.

or something like
Code:
thread.sleep(100)

^^^ milliseconds.

i personally find that neater than using a timer. with this you constantly loop, and let the sleep do the timeout/delay, whereas with a timer you'd let it execute your code when it ticks at the certain interval.

_________________
Back to top
View user's profile Send private message MSN Messenger
tanjiajun_34
Grandmaster Cheater
Reputation: 0

Joined: 16 Feb 2006
Posts: 786
Location: Singapore

PostPosted: Sun Feb 22, 2009 1:39 am    Post subject: Reply with quote

we do not need to add anything?
Back to top
View user's profile Send private message
Michel
Expert Cheater
Reputation: 0

Joined: 16 May 2007
Posts: 214
Location: The Netherlands

PostPosted: Sun Feb 22, 2009 9:18 am    Post subject: Reply with quote

Code:
if odd (GetAsyncKeyState(VK_F1)
then
if timer1.enabled := false then
timer1.enabled := true
else
timer1.enabled := false;
end;
Back to top
View user's profile Send private message
tanjiajun_34
Grandmaster Cheater
Reputation: 0

Joined: 16 Feb 2006
Posts: 786
Location: Singapore

PostPosted: Mon Feb 23, 2009 2:48 am    Post subject: Reply with quote

Thanks bro...btw i want to ask about converting a dr script to delphi code, how to do it?
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