| View previous topic :: View next topic |
| Author |
Message |
tanjiajun_34 Grandmaster Cheater
Reputation: 0
Joined: 16 Feb 2006 Posts: 786 Location: Singapore
|
Posted: Sun Feb 22, 2009 12:26 am Post subject: [Delphi]Trouble Making (More question) |
|
|
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 |
|
 |
iRiot Master Cheater
Reputation: 0
Joined: 03 Jul 2007 Posts: 395 Location: Aka RIOT
|
Posted: Sun Feb 22, 2009 12:34 am Post subject: |
|
|
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 |
|
 |
tanjiajun_34 Grandmaster Cheater
Reputation: 0
Joined: 16 Feb 2006 Posts: 786 Location: Singapore
|
Posted: Sun Feb 22, 2009 12:53 am Post subject: |
|
|
| So by that we can choose a number for the delay? |
|
| Back to top |
|
 |
iRiot Master Cheater
Reputation: 0
Joined: 03 Jul 2007 Posts: 395 Location: Aka RIOT
|
Posted: Sun Feb 22, 2009 12:56 am Post subject: |
|
|
| 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 |
|
 |
FullyAwesome I post too much
Reputation: 0
Joined: 05 Apr 2007 Posts: 4438 Location: Land Down Under
|
Posted: Sun Feb 22, 2009 12:57 am Post subject: |
|
|
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
^^^ 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 |
|
 |
tanjiajun_34 Grandmaster Cheater
Reputation: 0
Joined: 16 Feb 2006 Posts: 786 Location: Singapore
|
Posted: Sun Feb 22, 2009 1:39 am Post subject: |
|
|
| we do not need to add anything? |
|
| Back to top |
|
 |
Michel Expert Cheater
Reputation: 0
Joined: 16 May 2007 Posts: 214 Location: The Netherlands
|
Posted: Sun Feb 22, 2009 9:18 am Post subject: |
|
|
| Code: | if odd (GetAsyncKeyState(VK_F1)
then
if timer1.enabled := false then
timer1.enabled := true
else
timer1.enabled := false;
end; |
|
|
| Back to top |
|
 |
tanjiajun_34 Grandmaster Cheater
Reputation: 0
Joined: 16 Feb 2006 Posts: 786 Location: Singapore
|
Posted: Mon Feb 23, 2009 2:48 am Post subject: |
|
|
| Thanks bro...btw i want to ask about converting a dr script to delphi code, how to do it? |
|
| Back to top |
|
 |
|