C
C#14mo ago
0944

❔ App Freezed Even Added Threads.Sleep in Loop

while (this.run)
{
if (!this.run)
{
break;
}
Win32.POINT p = new Win32.POINT();
Win32.ClientToScreen(IntPtr.Zero, ref p);
Win32.mouse_event(Win32.MOUSEEVENTF_LEFTDOWN | Win32.MOUSEEVENTF_LEFTUP, (uint)p.x, (uint)p.y, 0, 0);
Thread.Sleep(1000);

}
while (this.run)
{
if (!this.run)
{
break;
}
Win32.POINT p = new Win32.POINT();
Win32.ClientToScreen(IntPtr.Zero, ref p);
Win32.mouse_event(Win32.MOUSEEVENTF_LEFTDOWN | Win32.MOUSEEVENTF_LEFTUP, (uint)p.x, (uint)p.y, 0, 0);
Thread.Sleep(1000);

}
This is my code. Its a UWP Application. The App Freeezed After This Executed I Also tried remove Clicking Part. its still freezed. Can Someone Help Me?
No description
5 Replies
Jimmacle
Jimmacle14mo ago
sleeping your UI thread will freeze your app
arion
arion14mo ago
in this case, looping infinitely will also freeze your app
SG97
SG9714mo ago
an autoclicker huh
0944
0944OP14mo ago
I was trying to create a ac in c# An*
Accord
Accord14mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server