This repository has been archived by the owner on Oct 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1dcebd6
commit baa4d25
Showing
6 changed files
with
98 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System.Threading; | ||
using System.Windows.Input; | ||
using System; | ||
|
||
namespace Easyyyyy.Core | ||
{ | ||
class Click | ||
{ | ||
|
||
public static void execClick(int countCPS, bool isEnabledRandom, bool isToggleEnabled, bool isLeftClick, bool isDefaultClicks, bool isToggleMode) | ||
{ | ||
int timeToWait = 0; | ||
if (isEnabledRandom && countCPS > 5) timeToWait = (1000 / new Random().Next(countCPS - ((countCPS / 100) * 25), countCPS)); | ||
else timeToWait = (1000 / countCPS); | ||
|
||
var mouse = new Core.Mouse(); | ||
|
||
if (isToggleMode) | ||
{ | ||
if (isToggleEnabled) | ||
{ | ||
// if double click | ||
if (isDefaultClicks) | ||
{ | ||
mouse.oneClick(isLeftClick); | ||
} | ||
else | ||
{ | ||
mouse.doubleClick(isLeftClick); | ||
} | ||
} | ||
|
||
Thread.Sleep(timeToWait); | ||
} | ||
else | ||
{ | ||
// if double click | ||
if (isDefaultClicks) | ||
{ | ||
mouse.oneClick(isLeftClick); | ||
} | ||
else | ||
{ | ||
mouse.doubleClick(isLeftClick); | ||
} | ||
|
||
Thread.Sleep(timeToWait); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Easyyyyy.Core | ||
{ | ||
public class Win32 | ||
{ | ||
[DllImport("User32.dll")] | ||
public static extern bool GetAsyncKeyState(int vKey); | ||
|
||
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] | ||
public static extern void mouse_event(MouseEvent dwFlags, long dx, long dy, long cButtons, long dwExtraInfo); | ||
|
||
public enum MouseEvent | ||
{ | ||
MOUSEEVENTF_LEFTDOWN = 0x02, | ||
MOUSEEVENTF_LEFTUP = 0x04, | ||
MOUSEEVENTF_RIGHTDOWN = 0x08, | ||
MOUSEEVENTF_RIGHTUP = 0x10, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters