Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- VerNo = 0.912
- tt := "Hotsweet " . VerNo . " - "
- /*
- **********
- SCREENDUMP
- **********
- Whenever you hit the printscreen key, it will automatically save the picture in a folder of your choice using an automatic
- naming scheme.
- Unfortunately, this feature will not work without IrfanView installed because I cannot crack the internal clipboard format used by AutoHotKey.
- IRFANVIEW CAN BE DOWNLOADED FROM HTTP://WWW.IRFANVIEW.COM/
- */
- ~PrintScreen::
- Sleep 30
- ImageToSave := ClipboardAll
- Loop {
- IDNumber := ""
- Loop % DumpNumberWidth - StrLen(A_Index) {
- IDNumber .= "0"
- }
- IDNumber .= A_Index
- ShortFileName := DumpFilePrefix . IDNumber . DumpExtension
- FileName := A_WorkingDir . "\Screendumps\" . ShortFileName
- } Until !FileExist(FileName)
- Run, i_view32.exe /clippaste /convert=%FileName%, C:\Program Files (x86)\IrfanView\
- If (!ErrorLevel)
- ToolTipDisplay(tt . "Screenshot successfully saved to " . ShortFileName,-1000)
- Else
- ToolTipDisplay(tt . "Screenshot save failed. Please make sure IrfanView is properly installed in its default directory.",-4000)
- Return
- ; Tooltip display function and removal subroutine.
- ToolTipDisplay(Message, Delay) {
- ToolTip, %Message%
- SetTimer, RemoveToolTip, %Delay%
- Return
- }
- RemoveToolTip:
- SetTimer, RemoveToolTip, Off
- ToolTip
- Return
Add Comment
Please, Sign In to add comment