mausklick zeitgesteuert ?



  • hallo.
    ich suche schon seit geraumer zeit ein programm was einen linken mausklick ausführt und zwar zu einer bestimmten zeit. konkret wollte ich etwas aufnehmen lassen...
    kennt jemand so ein tool oder könnte mir jemadn so etwas mal proggen ?
    also um 15:30 und 17:00 ein mauskick ausführen.
    danke im voraus.





  • bitte bitte bitteee 😕



  • Da wäre das Projekteforum wohl angebrachter.
    Mit Hinweis, wieviel du bezahlst 😉



  • #include <windows.h>
    
    LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
    
    const UINT TimerSec = 1;
    const UINT SizeX    = 60;
    const UINT SizeY    = 80;
    
    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
                       PSTR szCmdLine, int iCmdShow)
    {
       MSG         msg;
       HWND        hWnd;
       WNDCLASS    wc;
    
       const char szAppName[] = "Stopuhr";
    
       wc.cbClsExtra          = 0;
       wc.cbWndExtra          = 0;
       wc.hbrBackground       = (HBRUSH) GetStockObject(WHITE_BRUSH);
       wc.hCursor             = LoadCursor(NULL, IDC_ARROW);
       wc.hIcon               = LoadIcon(NULL, IDI_APPLICATION);
       wc.hInstance           = hInstance;
       wc.lpfnWndProc         = WndProc;
       wc.lpszClassName       = szAppName;
       wc.lpszMenuName        = NULL;
       wc.style               = CS_HREDRAW | CS_VREDRAW;
    
       RegisterClass(&wc);
    
       hWnd = CreateWindow(  szAppName,
                             szAppName,
    
                             WS_OVERLAPPED | WS_SYSMENU,
    
                             CW_USEDEFAULT,
                             CW_USEDEFAULT,
                             SizeX,
                             SizeY,
                             NULL,
                             NULL,
                             hInstance,
                             NULL);
    
       ShowWindow(hWnd, iCmdShow);
       UpdateWindow(hWnd);
    
       while (GetMessage(&msg, NULL, 0, 0))
       {
          TranslateMessage(&msg);
          DispatchMessage(&msg);
       }
    
       return msg.wParam;
    }
    
    LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
    {
       static RECT     rect;
       static BOOL     isActive;
       static int      iSec;
       static int      iMin;
    
       switch (message)
       {
    
       case WM_SIZE:
          {
             rect.right  = LOWORD(lParam);
             rect.bottom = HIWORD(lParam);
             return 0;
          }
    
       case WM_KEYDOWN:
          {
             switch (wParam)
             {
    
             case VK_SPACE:
                {
                   isActive = !isActive;
    
                   if (isActive)
                   {
    
                      SetTimer(hWnd, TimerSec, 1000, NULL);
                   }
                   else
                   {
    
                      KillTimer(hWnd, TimerSec);
                   }
                   return 0;
                }
    
             case VK_BACK:
                {
                   if (isActive)
                   {
                      isActive = FALSE;
                      KillTimer(hWnd, TimerSec);
                   }
                   iMin = iSec = 0;
                   InvalidateRect(hWnd, NULL, TRUE);
                   return 0;
                }
    
             case VK_ESCAPE:
                {
                   SendMessage(hWnd, WM_CLOSE, 0, 0);
                   return 0;
                }
             }
             return 0;
          }
    
       case WM_TIMER:
          {
             [b]if(iMin==2 && iSec==0) {iMin=0;}[/b]
             if (iSec < 59)
                ++iSec;
             else
             {
                iSec = 0;
                ++iMin;
             }
             InvalidateRect(hWnd, NULL, TRUE);
             return 0;
          }
    
       case WM_PAINT:
          {
             PAINTSTRUCT   ps;
             HDC           hDC;
             SIZE          size;
             char          sTime[6];
             int           iLength;
    
             iLength = wsprintf(sTime, "%i:%02i", iMin, iSec);
    
             hDC = BeginPaint(hWnd, &ps);
             {
                GetTextExtentPoint32(hDC, sTime, iLength, &size);
    
                TextOut(hDC, rect.right / 2 - size.cx / 2, rect.bottom / 2 -
                             size.cy / 2, sTime, iLength);
             }
             EndPaint(hWnd, &ps);         
             return 0;
          }
       case WM_DESTROY:
          {
             if (isActive)
             {
                KillTimer(hWnd, TimerSec);
             }
             PostQuitMessage(0);
             return 0;
          }
       }
       return DefWindowProc(hWnd, message, wParam, lParam);
    }
    

    habe ein timer proggi gefunden und einen eintrag reingezeichent wenn 2 min vergangen sind soll die uhr auf 0 gesetzt werden...
    aber wie kriege ich anstatt dieser 'if' abfrage dass sich die linke maustaste aktiviert 😕



  • armes forum 😋



  • arm bist du, kannst ja nicht mal programmieren 😋



  • erst registrieren dann weiter reden 😉
    ... war mir klar dass erst auf so ein posting jemand antworten wird 👎
    könnte mir jeand vlt. verraten wie ich ein 'enter' zeitgesteuert hinbekomme ?
    wie man dies abfragt weiss ich ja aber wie man eins auslöst ist mir noch rätselhaft.
    danke danke.


Anmelden zum Antworten