Taking Screenshots using Dev C++

Oct 21, 2016 at 3:59pm
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?
Oct 21, 2016 at 5:59pm
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.
Oct 21, 2016 at 8:20pm
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 Oct 21, 2016 at 8:21pm
Oct 21, 2016 at 8:32pm
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.