using System;
using System.Runtime.InteropServices;
class titretttbeniiiii
{
[DllImport("user32.dll")]
public static extern bool GetCursorPos(out POINT lpNokta);
[DllImport("user32.dll")]
public static extern void mouse_event(uint dwFlags, int dx, int dy, int dwData, int dwExtraInfo);
[StructLayout(LayoutKind.Sequential)]
public struct POINT
{
public int X;
public int Y;
}
private const uint MOUSEEVENTF_LEFTDOWN = 0x0002;
private const uint MOUSEEVENTF_LEFTUP = 0x0004;
public static void titretttttttttt()
{
GetCursorPos(out POINT mevcutKonum); // orgins fare konumunu al
// miki mouse titretmeeeeee uygula
const int titremeMiktari = 10; // titretmeeee miktarı px cinsinden)
const int titremeSuresi = 50; // titremtmeee süresi ms cinsinden
int hedefX = mevcutKonum.X + titremeMiktari;
int hedefY = mevcutKonum.Y + titremeMiktari;
// hafif humanlaştırma
int orijinalX = mevcutKonum.X;
int orijinalY = mevcutKonum.Y;
SetCursorPos(hedefX, hedefY); // hedefe gits
System.Threading.Thread.Sleep(titremeSuresi); // waitttt
SetCursorPos(orijinalX, orijinalY); // eskiye dönnnnnnnss
System.Threading.Thread.Sleep(titremeSuresi); // wait brooo
mouse_event(MOUSEEVENTF_LEFTDOWN, orijinalX, orijinalY, 0, 0); // tıklassss
System.Threading.Thread.Sleep(titremeSuresi); // Beklesene aq
mouse_event(MOUSEEVENTF_LEFTUP, orijinalX, orijinalY, 0, 0); // bıraksss
SetCursorPos(mevcutKonum.X, mevcutKonum.Y); // geri dönsssss
}
[DllImport("user32.dll")]
public static extern bool SetCursorPos(int x, int y);
}
class Program
{
static void Main()
{
while (true)
{
if (GetAsyncKeyState(0x01) < 0) // Soltıks
{
titretttbeniiiii.titretttttttttt();
}
}
}
[DllImport("user32.dll")]
public static extern short GetAsyncKeyState(int vKey);
}