Jump to content

Prt Scr > x.jpeg


Recommended Posts

Hy, firs i wanna say that ive made some little apps in autoit quite a long time ago, but now i need anotherone to do this.

XP - everybody knows that when Prt Scr buttin is pressed a printscreen iamge is stored in the clipboard, press again and that imagie is overwrited with the latest one, ok i sopose all of already knows that, now, a wanna get rid of going in paint, paste the img, go trough menus to save the image, i wanna make a little app that do this :

I press the printscreen button, im going for example to desktop and open "app name" and this ask me trough an imput box, what name i want for the pic and optional maybe i wont include this where to save the file, and yes in an jpeg format, and if it works maybe i will impove it.

I just need to know where to start, how to read the clipboard and read what ??

Srry for my bad eng

Link to comment
Share on other sites

hmm, i dont get it, i just wanna somehow make my script extract the image from the clipboard, and then save it, i dont wanna use the script for taking screenshots, the screenshots are tooked with the Prt Scr button.

Link to comment
Share on other sites

hmm, i dont get it, i just wanna somehow make my script extract the image from the clipboard, and then save it, i dont wanna use the script for taking screenshots, the screenshots are tooked with the Prt Scr button.

You are basically doing the same thing.
Link to comment
Share on other sites

hmm, i dont get it, i just wanna somehow make my script extract the image from the clipboard, and then save it, i dont wanna use the script for taking screenshots, the screenshots are tooked with the Prt Scr button.

look at autoit library

if you want to get the screen shots with print screen button use HotKeySet() or _IsPressed()

Link to comment
Share on other sites

So, i see i can retrieve the image with _Clip_GetData(CF_BITMAP ) right ? now how do i save that into a jpeg file on the desktop. I sopose i need to create a new empty jpeg file and the paste the contents retrieved from the clipboard into that empty image right ?

Link to comment
Share on other sites

So, i can use the _Clip_GetData(CF_BITMAP ) and save the image with _ScreenCap_SaveImage("C:\Image.jpg", $ps) ???????

something like this

$ps = _Clip_GetData([CF_BITMAP])

_ScreenCap_SaveImage("C:\Image.jpg", $ps)

??

Link to comment
Share on other sites

So, i see i can retrieve the image with _Clip_GetData(CF_BITMAP ) right ? now how do i save that into a jpeg file on the desktop. I sopose i need to create a new empty jpeg file and the paste the contents retrieved from the clipboard into that empty image right ?

well did you look at autoit library?

look at ScreenCap.au3 in your Au3Lib folder and there is the answer, everything is automated, you press the button and simultaneously you get the picture where you want it

i think it's something like that:

#include <A3LScreenCap.au3>
_ScreenCap_Capture([path to create e.g "c:\JPG100.jpg"])oÝ÷ ÙìZ^jëh×6#NoTrayIcon
#include <A3LScreenCap.au3>

HotKeySet("{PRINTSCREEN}", "_cap")
HotKeySet("!^#e", "_ext")

While 1
sleep(10)
Wend

Func _cap()
_ScreenCap_Capture(@desktopdir & "\picture.jpg")
sleep(10)
EndFunc

Func _ext()
Exit
EndFunc

helped enough?

EDIT:i saw your post now, that's if you want it to copy from clipboard first

Edited by c4nm7
Link to comment
Share on other sites

thats the prb, i DO NOT need this automated, i dont need the app to capture the screen for me, i wanna capture it with the PrtScr button, and then I OPEN the app, the app retrieves the captured bitmap from clipboard and save it automatically to the desktop in jpeg format.

Link to comment
Share on other sites

thats the prb, i DO NOT need this automated, i dont need the app to capture the screen for me, i wanna capture it with the PrtScr button, and then I OPEN the app, the app retrieves the captured bitmap from clipboard and save it automatically to the desktop in jpeg format.

You are the one that doesn't understand, look at the func.

Maybe this is what you want, i will just give you the ideas and func name.

You press print screen

You open app

App:

_ClipGetImage(): get the img

_ScreenCap_SaveImage("C:\Image.jpg", $ps); save it

Exit

Is that what you want? But that's just plain stupid because you are doing the same thing as we suggest you should do.

Edited by Generator
Link to comment
Share on other sites

Hehe ive made it, now im working on other things, like asking what quality do u want for the pic or whre to save it, thx man, i will need some more help im sure of that.

Anyway thx a lot

Link to comment
Share on other sites

Hehe ive made it, now im working on other things, like asking what quality do u want for the pic or whre to save it, thx man, i will need some more help im sure of that.

Anyway thx a lot

Sure it wasn't that hard, but you were missing our point there.
Link to comment
Share on other sites

Hehe ive made it, now im working on other things, like asking what quality do u want for the pic or whre to save it, thx man, i will need some more help im sure of that.

Anyway thx a lot

ok a suggestion , use _ScreenCap_SetJPGQuality() and FileSaveFolder()

Link to comment
Share on other sites

just one question, whats the correct form over here ?

_ScreenCap_SaveImage("C:\Image.jpg", $ps) - here i wanna use the desktop path with @DesktopDir

_ScreenCap_SaveImage("@DesktopDir\Image.jpg", $ps) or without the quotes I still miss the right 'formula"

Link to comment
Share on other sites

just one question, whats the correct form over here ?

_ScreenCap_SaveImage("C:\Image.jpg", $ps) - here i wanna use the desktop path with @DesktopDir

_ScreenCap_SaveImage("@DesktopDir\Image.jpg", $ps) or without the quotes I still miss the right 'formula"

its this

_ScreenCap_SaveImage(@DesktopDir &"\Image.jpg", $ps)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...