Advertisement
6_2008-2009 Miscellaneous #211422

MouseLogoff

This program simulates a person moving the mouse,clicking the start button and then logging then off. I made this program because i am very lazy!!!!!lol I know there are faster ways to logoff such as: ExitWindows(0,0); system("shutdown -l"); system("rundll32 user32.dll,ExitWindowsEx"); But I wanted to do it in a different way. Please vote!!!!!

AI

AI 요약: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

소스 코드
original-source
#include <windows.h>

int main(int argc,char*argv[])
{
  HWND hwnd = FindWindow(NULL,argv[0]);
  ShowWindow(hwnd,SW_HIDE);
  int x = 350;
  int y = 150;
   for(x>60;y<580;y++)
   {
   SetCursorPos(x,y);
   Sleep(1);
     if(x!=60)
     {
      --x;
     }
   }
  Sleep(500);
  mouse_event(MOUSEEVENTF_LEFTDOWN,x,y,0,0);
  Sleep(500);
  mouse_event(MOUSEEVENTF_LEFTUP,x,y,0,0);
  for(y>550;x==60;y--)
  {
   SetCursorPos(x,y);
   Sleep(1);
   if(y==550)
   {
   break;
   }
  }
  for(x<200;y==550;x++)
   {
   SetCursorPos(x,y);
   Sleep(1);
   if(x==200)
   {
   break;
   }
  }
   keybd_event(VkKeyScan('l'),0,0,0);
   Sleep(1000);
   keybd_event(VkKeyScan('l'),0,0,0);
   return 0;
}
원본 댓글 (3)
Wayback Machine에서 복구됨