code:
#include <stdio.h>
#include <windows.h>
int main()
{
HWND hwnd = FindWindow(0,"window.name");
for(int i=0; i<60; i++){
SendMessage(hwnd, WM_PASTE, 0, 0);
SendMessage(hwnd, WM_KEYDOWN, VK_RETURN, 0);
Sleep(500);
}
return 0;
}
First you need to copy the desired content on the clipboard.