| View previous topic :: View next topic |
| Author |
Message |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sat Feb 16, 2008 11:27 am Post subject: [request] tuts about making AC in C# |
|
|
i searched for like a hour in CEF and all i could've found is only releasing of auto clickers withou source code or Tutorials how to make one
can any1 direct me to a good tut please ?
_________________
Stylo |
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sat Feb 16, 2008 11:31 am Post subject: |
|
|
Ok, I'm not gonna give you the code, but I'll throw out a simple algorithm:
| Code: |
1) Wait for button press (start) or hotkey press (whatever hotkey for starting)
2) On start (whether hotkey or button), send a click to a pre-defined application (or the highest level application)
3) wait a pre-defined amount of time (usually about 10-100 ms)
4) Check for button press (stop) or hotkey press (whatever for stopping)
5) if not, go to 2
6) else, go to 1
|
For the hotkeys, you can check out my keyboard hook in the GP+ section.
For clicking, you should look at PostMessage
For waiting, use
| Code: |
System.Threading.Thread.Sleep(desiredtime);
|
_________________
|
|
| Back to top |
|
 |
Michel Expert Cheater
Reputation: 0
Joined: 16 May 2007 Posts: 214 Location: The Netherlands
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sat Feb 16, 2008 12:34 pm Post subject: |
|
|
look samurai thats what i have done(attachment below) (but it's without a hotkey cuz i dont really know how to use hotkey :\)
what i'm asking is how can i make it click super fast?!
edit: almost forgot the source code
2nd attachment
_________________
Stylo |
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sat Feb 16, 2008 1:28 pm Post subject: |
|
|
| Your code wrote: |
| Code: |
public static void LClick()
{
mouse_event((uint)MouseEventFlags.LEFTDOWN, 0, 0, 0, 0);
Pause(150); //Give it time to understand it
mouse_event((uint)MouseEventFlags.LEFTUP, 0, 0, 0, 0);
Pause(100);
}
|
|
The way to make it click faster is change the values of pause.
Btw, I'm just curious--that's the exact method name, and maybe exact code (I'm not sure, I'd have to check) of a method for a Macro class that I wrote a while back. Did you write this yourself?
Edit:
| Micheltjuh wrote: | http://forum.cheatengine.org/viewtopic.php?p=2048375&highlight=#2048375
EDIT: oops, I didn`t notice you said C#.. sorry, I don`t think you can use that alot.. |
C# is able to do anything that any other language can do--except, in some cases, easier, and can also develop things on the web.
Don't put C# down if you don't know anything about it.
_________________
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sat Feb 16, 2008 1:36 pm Post subject: |
|
|
Ah.
Np. =)
~~
Anything else you need, just post.
_________________
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sat Feb 16, 2008 1:56 pm Post subject: |
|
|
| samuri25404 wrote: | | Your code wrote: |
| Micheltjuh wrote: | http://forum.cheatengine.org/viewtopic.php?p=2048375&highlight=#2048375
EDIT: oops, I didn`t notice you said C#.. sorry, I don`t think you can use that alot.. |
C# is able to do anything that any other language can do--except, in some cases, easier, and can also develop things on the web.
Don't put C# down if you don't know anything about it. |
Dont you mean slower and with bulkier code? >.<
|
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sat Feb 16, 2008 1:57 pm Post subject: |
|
|
i changed the value in the pause to 1 it did click a little faster but still on the other hand when i use other ac that some1 else made it's clicking alot more faster :\
_________________
Stylo |
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sat Feb 16, 2008 2:06 pm Post subject: |
|
|
| 1qaz wrote: | | i changed the value in the pause to 1 it did click a little faster but still on the other hand when i use other ac that some1 else made it's clicking alot more faster :\ |
Simply because .NET isn't as fast as everything else.
| blankrider wrote: | | samuri25404 wrote: | | Your code wrote: |
| Micheltjuh wrote: | http://forum.cheatengine.org/viewtopic.php?p=2048375&highlight=#2048375
EDIT: oops, I didn`t notice you said C#.. sorry, I don`t think you can use that alot.. |
C# is able to do anything that any other language can do--except, in some cases, easier, and can also develop things on the web.
Don't put C# down if you don't know anything about it. |
|
Dont you mean slower and with bulkier code? >.<
|
Sure, it has a 1-2% performance drop, but so what? The .NET Framework has a lot of managed wrappers that make it so much easier to do things.
For example, Wicc wrote a method in C++ to return an array of procs or something like that by proc name. In C#,
| Code: |
Process[] myprocs = Process.GetProcessesByName("notepad.exe");
|
_________________
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Feb 16, 2008 2:50 pm Post subject: |
|
|
| Use SendInput instead of mouse_event
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
|
| Back to top |
|
 |
Henley Grandmaster Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 671
|
|
| Back to top |
|
 |
|