| View previous topic :: View next topic |
| Author |
Message |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Mon Jul 30, 2007 10:16 am Post subject: Disabling threading (From CE Source...) ? |
|
|
How do I disable it?
| Code: |
type TFlash = class (TThread)
public
procedure Execute; override;
procedure col;
end;
...
var ncol: TColor;
procedure TFlash.Col;
begin
mainform.panel1.Color:=ncol;
end;
procedure TFlash.Execute;
var red,green: byte;
decreasered: boolean;
begin
{$ifndef ceasinjecteddll}
decreasered:=true;
red:=254;
green:=0;
while not terminated do
begin
if decreasered then
begin
dec(red,3);
inc(green,3);
if green>=250 then decreasered:=false;
end
else
begin
inc(red,3);
dec(green,3);
if red>=254 then
decreasered:=true;
end;
ncol:=(green shl 8)+red;
synchronize(col); //sigh (withouth it works too, but at least with this I know for sure it works.
sleep(20);
end;
{$endif}
mainform.Panel1.Color:=clBtnFace;
end;
procedure TMainForm.FormCreate(Sender: TObject);
begin
tflash.create(false);
end;
|
but how do i disable it?
tflash.create(true) doesnt work. |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25820 Location: The netherlands
|
Posted: Mon Jul 30, 2007 10:20 am Post subject: |
|
|
not creating it at all stops it. And that true should work as well since the param means createsuspended, so it's created but paused
But no idea what you mean with threading and WHY you want to disable it?
It could be you mean the timers that update the list and some other stuff. You can set those to disabled. (timers arn't really threading since it still runs in the context of the main app, it's just code that gets executed as a response to a event)
and remove synchronize(col); will also stop it from changing the color _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Mon Jul 30, 2007 10:35 am Post subject: |
|
|
| Dark Byte wrote: |
and remove synchronize(col); will also stop it from changing the color |
yes but this is copied directly from your source so you wrote yourself it will work without, but it doesnt. (I'm not that good that i'll remember everything) I wanna do like in your CE, when you hit the attach to process button, it disables the threading. |
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Mon Jul 30, 2007 12:45 pm Post subject: |
|
|
Why WOULD you want to remove the threading?
I'm working on a memory scanner that uses multiple threads to divide up the time for scanning a program's memory. I'm not sure if CE works the same way, but if it does, it would be DREADFULLY slow without the threads. |
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Mon Jul 30, 2007 3:11 pm Post subject: |
|
|
| with threading i mean a glowing panel. I'm not sure were thinking of the same things. |
|
| Back to top |
|
 |
UnLmtD Grandmaster Cheater
Reputation: 0
Joined: 13 Mar 2007 Posts: 894 Location: Canada
|
Posted: Mon Jul 30, 2007 3:20 pm Post subject: |
|
|
Threading as in multi threading, when you have multiple threads running, doing something so you application doesn't lag as much. _________________
|
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Mon Jul 30, 2007 3:24 pm Post subject: |
|
|
I just want to disable the glowing panel (threading), and also understand a bit of the code.
If you either explain how to make a code, or give one to me so i can study it would be really nice, if it is possible. |
|
| Back to top |
|
 |
DeltaFlyer Grandmaster Cheater
Reputation: 0
Joined: 22 Jul 2006 Posts: 666
|
Posted: Mon Jul 30, 2007 3:49 pm Post subject: |
|
|
| Kevinnn wrote: | I just want to disable the glowing panel (threading), and also understand a bit of the code.
If you either explain how to make a code, or give one to me so i can study it would be really nice, if it is possible. |
That's not disabling threading... that's pausing or terminating A SINGLE thread.
Try calling the terminate or pause procedure. _________________
Wow.... still working at 827... what's INCA thinking?
zomg l33t hax at this place (IE only). Over 150 people have used it, what are YOU waiting for? |
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Mon Jul 30, 2007 3:55 pm Post subject: |
|
|
| wont work, since its a class. It only allows create and some other wierd ones, but none pauses it. |
|
| Back to top |
|
 |
DeltaFlyer Grandmaster Cheater
Reputation: 0
Joined: 22 Jul 2006 Posts: 666
|
Posted: Mon Jul 30, 2007 3:59 pm Post subject: |
|
|
Ok, I just read the code you posted. There should be a boolean value named terminate. Set that to true, and the thread should stop changing the colours of whatever you were changing. _________________
Wow.... still working at 827... what's INCA thinking?
zomg l33t hax at this place (IE only). Over 150 people have used it, what are YOU waiting for? |
|
| Back to top |
|
 |
Kevin Grandmaster Cheater Supreme
Reputation: 0
Joined: 07 Mar 2007 Posts: 1139 Location: Spiderman-World
|
Posted: Mon Jul 30, 2007 4:06 pm Post subject: |
|
|
so it should be something like
tflash.terminate(true);
but i can't. It says something that it can't do that function because its a class. |
|
| Back to top |
|
 |
DeltaFlyer Grandmaster Cheater
Reputation: 0
Joined: 22 Jul 2006 Posts: 666
|
Posted: Mon Jul 30, 2007 5:45 pm Post subject: |
|
|
| Kevinnn wrote: | so it should be something like
tflash.terminate(true);
but i can't. It says something that it can't do that function because its a class. |
You didn't even learn the basics of OOP...
Classes are blueprints; they contain the information on how the class will function, but the blueprint itself cannot function. To make it function, an instance of the class must be created through a constructor through the process called instantiation.
Of course you can't call terminate on TFlash, it's only a blueprint. The blueprint of an oven can't bake a cake for you.
To make it function, you must first declare a variable of the type TFlash. Then, to start the flashing, you would call the constructor of TFlash, which in this case is called Create and takes in a boolean. This constructor returns a working instance of the class. Assign this instance to the variable you have previously declared, and you will have a valid means of communicating with the thread.
Then, to terminate, suspend, or resume the thread, you could simply call the procedures Terminate, Suspend, or Resume, respectively, from the variable of type TFlash. _________________
Wow.... still working at 827... what's INCA thinking?
zomg l33t hax at this place (IE only). Over 150 people have used it, what are YOU waiting for? |
|
| Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Mon Jul 30, 2007 6:02 pm Post subject: |
|
|
tflash.create(false); <---- Remove this or comment !!!
//tflash.create(false);
isnt that visible ??? |
|
| Back to top |
|
 |
DeltaFlyer Grandmaster Cheater
Reputation: 0
Joined: 22 Jul 2006 Posts: 666
|
Posted: Mon Jul 30, 2007 6:08 pm Post subject: |
|
|
| Kaspersky wrote: | tflash.create(false); <---- Remove this or comment !!!
//tflash.create(false);
isnt that visible ??? |
Without that line the thread won't even be created....
Anyways, to demonstrate what I meant by my previous post, I have attached a sample. TT1 is the name of the class (equivalent of your TFlash). Thread is the variable used to hold the instance of TT1 created by its constructor. The buttons are self-explanatory. _________________
Wow.... still working at 827... what's INCA thinking?
zomg l33t hax at this place (IE only). Over 150 people have used it, what are YOU waiting for? |
|
| Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Mon Jul 30, 2007 6:08 pm Post subject: |
|
|
| He wanted to remove it, but i told him how to disable it, same thing. |
|
| Back to top |
|
 |
|