AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Taking Pictures with AHK?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
TheLostBoy



Joined: 18 Apr 2005
Posts: 14
Location: WI, USA

PostPosted: Fri May 27, 2005 6:33 am    Post subject: Taking Pictures with AHK? Reply with quote

Code:
   ^f8::
   Send, {alt}{printscreen}
   FileAppend, %clipboardall%, C:\AHKSnap.jpg


I'm sure thats how it should be to take a screen shot picture with AHK but for some reason it doesn't actually show a picture file but I get the message "cannot create preview" or something as such when I go to view it. However if I manually open the file with notepad HOLY MOLEY does it ever have a ton of ascii garb all over. Am I missing something.. perhaps this is not possible but if it is and you guys know how to do it properly I'd love to know

DANKA! Razz
_________________
"It was when I found out I could make mistakes that I knew I was on to something."
--Ornette Coleman
Back to top
View user's profile Send private message Visit poster's website AIM Address
BoBo
Guest





PostPosted: Fri May 27, 2005 7:17 am    Post subject: Reply with quote

Maybe its possible to convert the image to disk via the "Print To File"-option?! (BrainDump, might be pure nonsense Rolling Eyes)

btw: that could be of interest as well (for Chris&friends with source code) - [ClipboardImageArchiver]
Back to top
BoBo
Guest





PostPosted: Fri May 27, 2005 7:42 am    Post subject: Reply with quote

[Save Picture from Clipboard to file]

Sample for an optional AHK feature ? Wink
Back to top
BoBo
Guest





PostPosted: Fri May 27, 2005 7:48 am    Post subject: Reply with quote

[Capture Screen to Clipboard including dropdown menu
]
C++ with source.
Back to top
MYYM



Joined: 05 Apr 2005
Posts: 133

PostPosted: Fri May 27, 2005 8:09 am    Post subject: Reply with quote

Try this code, it'd save the picture using Paint (.bmp file)
you can replace it with any program you like to use that may support more formats (Jpg). But maybe you'll need to change the send commands.
Hotkeys used in the script are:
Ctrl+F8 ...... capture and save
Esc............. exit

Code:
^F8::
send {Alt}{printscreen}
Run,MSPAINT.EXE
WinWait, untitled - Paint
WinActivate, untitled - Paint
Send, {CTRLDOWN}v{CTRLUP}
Send, {ALTDOWN}f{ALTUP}
Send, A
WinWait, Save As
WinActivate, Save As
Send, %A_now%.bmp{ENTER}
WinWait, %A_now%.bmp,
IfWinNotActive, %A_now%.bmp, , WinActivate, %A_now%.bmp ,
Send, {ALTDOWN}{f4}{ALTUP}
return

esc::
exitapp
return

I hope that could do what you want.
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10716

PostPosted: Fri May 27, 2005 12:49 pm    Post subject: Reply with quote

BoBo, thanks for the code, but neither one is suitable. The first is C# and/or .Net, so can't be used due to code bloat and possibly a lack of compatibility on some systems. The second doesn't have any means to save the file to disk.

In spite of this, it's still on the to-do list to provide this capability, I just need to do more research.
Back to top
View user's profile Send private message Send e-mail
BoBo
Guest





PostPosted: Fri May 27, 2005 1:17 pm    Post subject: Reply with quote

Chris wrote:
Quote:
but neither one is suitable
Was just for informational purpose, as often Wink. Thx for your effort. Very Happy
Back to top
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group