AutoHotkey - printscreen command Topic is solved
AutoHotkey - printscreen command
I want a lil help to write a code that take printscreens each hour and save these images on a specific directory. Since now l apreciate.
Re: AutoHotkey - printscreen command Topic is solved
There is no simple AHK function to take a screenshot.
This thread outlines some of the easier methods to do it, though. For example, you can:
This thread outlines some of the easier methods to do it, though. For example, you can:
- Use a third-party image capture program that AHK can call with a Run command.
- Use an AHK library such as GDip.
Re: AutoHotkey - printscreen command
Example with freeware Irfanview ( picture viewer ) , allow commandline parameters
https://www.heise.de/download/product/i ... 5/download
( create a folder screenshots at desktop )
https://www.heise.de/download/product/i ... 5/download
( create a folder screenshots at desktop )
Code: Select all
;========================= HOTKEYS ===============================================
;################# PRINTSCREEN -- IrfanView ##########################################
*~$printscreen::
irfan =%a_programfiles%\IrfanView\i_view64.exe
ifnotexist,%irfan%
{
run,https://www.heise.de/download/product/irfanview-1965/download
exitapp
}
ifexist,%irfan%
{
screenshots=%a_desktop%\SCREENSHOTS
ifnotexist,%screenshots%
filecreatedir,%screenshots%
runwait, "%irfan%" "/capture=0 /convert=%screenshots%\%A_now%_screenshot.png"
;runwait, "%irfan%" "/capture=0 /convert=%screenshots%\%A_now%_screenshot.bmp"
run,%screenshots%
return
}
return
;-- active window keys = ALT+Printscreen
~$!printscreen::
irfan =%a_programfiles%\IrfanView\i_view64.exe
ifnotexist,%irfan%
{
run,https://www.heise.de/download/product/irfanview-1965/download
exitapp
}
ifexist,%irfan%
{
screenshots=%a_desktop%\SCREENSHOTS
ifnotexist,%screenshots%
filecreatedir,%screenshots%
InputBox, UserInput,Screenshot input File-Name
if errorlevel<>0
return
runwait, "%irfan%" "/capture=2 /convert=%screenshots%\%userinput%.png"
;runwait, "%irfan%" "/capture=2 /convert=%screenshots%\%a_now%_screenshot.png"
run,%screenshots%
return
}
return
;--------------
;----------------------------------------------------------------------------------
/*
https://www.heise.de/download/product/irfanview-1965/download
( http://www.irfanview.com/ )
--- capture values:
0 = whole screen
1 = current monitor, where mouse is located
2 = foreground window
3 = foreground window - client area
4 = rectangle selection
5 = object selected with the mouse
6 = start in capture mode (can't be combined with other commandline options)
--- Advanced examples:
i_view32.exe /capture=2 /convert=c:\test.jpg
Capture foreground window and save result as file.
i_view32.exe /capture=2 /convert=c:\capture_$U(%d%m%Y_%H%M%S).jpg
Capture foreground window and save result as file; the file name contains time stamp.
*/
;################# END PRINTSCREEN ############################################
Re: AutoHotkey - printscreen command
nircmd.exe screenshot <path> or Send #{PrintScreen} on windows10
Who is online
Users browsing this forum: No registered users and 203 guests