AutoHotkey

AutoHotkey

常用脚本

volumn_control.ahk

; ctrl + alt + [: mute
^![::Send {Volume_Mute}

; alt + [: volume down
![::Send {Volume_Down 1}

; alt + ]: volume up
!]::Send {Volume_Up 1}

按 "Alt + [" 和 "Alt + ]" 分别降低 / 增加音量。

take_screenshot.ahk

#persistent

; take screenshot and save to png file
; key: PrintScreen to capture full screen; Alt + PrintScreen or Alt + F12 to capture current window
; Require IrfanView (x64) https://www.irfanview.com/

screenshot1=%A_programfiles%\IrfanView\i_view64.exe ;- program
screenshots=D:\files\Drive\data\Screenshots ;- save folder

;-- button printscreen
;-- fullscreen
*~$printscreen::
SetTitleMatchMode, 2
ifexist,%screenshot1%
    {
   runwait, "%screenshot1%" "/capture=0 /convert=%screenshots%\screenshot_%A_now%.png"
   ;ifexist, %screenshots%
   ;  run,%screenshots%
   return
    }
return

~$!printscreen::
!F12::
SetTitleMatchMode, 2
ifexist,%screenshot1%
    {
    runwait, "%screenshot1%" "/capture=1 /convert=%screenshots%\screenshot_%A_now%.png"
    ;ifexist, %screenshots%
    ;  run,%screenshots%
    return
    }
return
;--------------

按 PrintScreen / Alt + PrintScreen 或 F12 / Alt + F12 截图并自动保存到某个文件夹。

需要安装 IrfanView。

IrfanView 默认设置下截图时包含鼠标光标。去除方式:运行一次 IrfanView 程序,点击 Options - Capture/Screenshot, 取消 Options 区域的 "include mouse cursor" 选项,点击 Start,然后再退出。


Last update: 2021-10-15 05:56:08 UTC