Taking Screenshots using Dev C++

I have this code

#include <iostream>
#include <windows.h>
using namespace std;



int main()
{
keybd_event(VK_MENU, 0, 0, 0);
keybd_event(VK_SNAPSHOT, 0, 0, 0);


keybd_event(VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0);
keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0);

return 0;
}

but what I would like to achieve, is create a loop that will continually perform screenshots at an interval of 15 minutes from 12 PM to 9 PM, then store them in a subdirectory within the picture folder of the user profile. Is there a simple way to do this?
Have you heard of scheduler? Even the MS Windows has one. You don't need your program to loop. You can tell the OS to run your program every 15 minutes.

Better yet, your desktop probably already has a program that takes screenshot. If it can take a picture non-interactively, then you don't need a separate program at all.
I have heard of the task scheduler, but I'm trying to automate the process completely and not set up anything manually. I want to basically double click the program and know that it's up and running, in the most simple way.
Last edited on
One surely can create a batch/powershell/whatever script/installer that simply creates a suitable entry into the task scheduler. Those are no less clickable than other files.


How about a websearch with "screen capture at intervals"? Surely some of those hits can be tuned to "one click wonders"?
Topic archived. No new replies allowed.