Hi all,
What I am trying to do (and failing miserably at) is to develop a utility that will automatically take screenshot at semi-random intervals (aka between 15 and 45 seconds).
I found this thread > thread102-392160 but it doesnt seem to work for me. Here is my code:
Can you guys spot what I am doing wrong, because I sure can't. I've tried both methods suggested in the other thread but it seems as if nothing is ever placed on the clipboard.
BobbaFet ![[bobafett] [bobafett] [bobafett]](/data/assets/smilies/bobafett.gif)
What I am trying to do (and failing miserably at) is to develop a utility that will automatically take screenshot at semi-random intervals (aka between 15 and 45 seconds).
I found this thread > thread102-392160 but it doesnt seem to work for me. Here is my code:
Code:
procedure TForm1.TakeScreenShot;
var myJPEG: TJPEGImage;
begin
Clipboard.Clear;
myJPEG := TJPEGImage.Create;
myJPEG.CompressionQuality := 75;
keybd_event(VK_SNAPSHOT,0,0,0);
myJPEG.LoadFromClipboardFormat(CF_BITMAP, ClipBoard.GetAsHandle(CF_BITMAP), 0);
myJPEG.Compress;
myJPEG.SaveToFile(myPath + '\playername.jpg');
myJPEG.Free;
end;
Can you guys spot what I am doing wrong, because I sure can't. I've tried both methods suggested in the other thread but it seems as if nothing is ever placed on the clipboard.
![[bobafett] [bobafett] [bobafett]](/data/assets/smilies/bobafett.gif)
![[bobafett] [bobafett] [bobafett]](/data/assets/smilies/bobafett.gif)
Code:
if not Programming = 'Severe Migraine' then
ShowMessage('Eureka!');