WhOOt Posted April 20, 2005 Posted April 20, 2005 Heyya! I'm Making this program, that saves screenshots at a temp place, and copies it to C:\Screenshots\ Now i need to know, how to clipput the Screenshot(.jpg file) to the clipboard.. Heres the code, if it helps any while 1 hotkeyset("^f", "_capture") hotkeyset("^d", "_captureclip") sleep(50) wend func _capture() $number = iniread("C:\Screenshots\ini.ini", "ini", "ini", "") if @error then _error() ; Capture full screen ; Fist parameter - filename, last - jpeg quality. DllCall("captdll.dll", "int", "CaptureScreen", "str", "dump_full.jpg", "int", 85) dircreate("C:\Screenshots") filemove("dump_full.jpg", "C:\Screenshots\Screenshot" & $number & ".jpg") $number = $number + 1 iniwrite("C:\Screenshots\ini.ini", "ini", "ini", $number) endfunc Func _captureclip() $number = iniread("C:\Screenshots\ini.ini", "ini", "ini", "") $number = $number - 1 $file = "C:\Screenshots\Screenshot" & $number clipput($file) EndFunc func _error() if not fileexists("C:\Screenshots\ini.ini") Then iniwrite("C:\Screenshots\ini.ini", "ini", "ini", "1") endif endfunc The problem is, that $file is letters, not a file.... ~WhOOt
Westi Posted April 20, 2005 Posted April 20, 2005 Post your C:\Screenshots\ini.ini. Maybe missing backslash in: $file = "C:\Screenshots\Screenshot" & $number
Devion Posted April 20, 2005 Posted April 20, 2005 Try using Lazycat's DLL for capturing screenshots!link: here
jpm Posted April 21, 2005 Posted April 21, 2005 for only one screen you can use printscreen or alt-printscreen which copy the screen or the active window to the clipboard and you can open Paint paste and save in .jpg format to reduce the size
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now