AutoHotkey

 ;注释 : #==win !==Alt  ^==Ctr  +==shift

需要注意的是不要和现有的快捷键冲突,他会代替掉原来的快捷键操作很难受的。

热指令:

比如 ::yx1::1359720840@qq.com

我输入yx1 回车,就出来我的邮箱啦,嘎嘎嘎嘎嘎嘎嘎嘎.....

;=========================================================
~lbutton & enter:: ;鼠标放在任务栏,滚动滚轮实现音量的加减
exitapp
~WheelUp::
if (existclass("ahk_class Shell_TrayWnd")=1)
Send,{Volume_Up}
Return
~WheelDown::
if (existclass("ahk_class Shell_TrayWnd")=1)
Send,{Volume_Down}
Return
~MButton::
if (existclass("ahk_class Shell_TrayWnd")=1)
Send,{Volume_Mute}
Return

Existclass(class)
{
MouseGetPos,,,win
WinGet,winid,id,%class%
if win = %winid%
Return,1
Else
Return,0
}
;=========================================================

windows_vista 这种连字符分隔的能否支持?
答:升级版如下
;tmplinshi
; 功能: 切换选中文字大小写
; 参数: Mode - 可以为 L (小写)、U (大写)、T (首字母大写)
;~ 兼容autohotkey 2.0

;sunwind
;~ http://blog.csdn.net/liuyukuan/article/details/54584035
;~ 增加连字符支持windows-vista

f7::SwitchSelCase("L") ; 选中文字切换为小写
f8::SwitchSelCase("U") ; 选中文字切换为大写
f9::SwitchSelCase("T") ; 选中文字切换为首字母大写

f10::
param=%1%
SwitchSelCase(param)
return
SwitchSelCase(Mode) {

clipBak := ClipboardAll ; 备份剪贴板
Clipboard := "" ; 清空剪贴板

Send, ^c ; 发送 ctrl+c 复制选中文字
ClipWait, 1 ; 等待复制完毕
selText := Clipboard

Loop, Parse, selText, %A_Space%_`,|;-!`.
{
; 计算在这个字段末尾分隔符的位置.
Position += StrLen(A_LoopField) + 1
; 获取解析循环中找到的分隔符.
Delimiter := SubStr(selText, Position, 1)
str1:= Format("{:" Mode "}", A_LoopField)
out:=out . str1 . Delimiter
}
Clipboard :=out
ClipWait, 1
Send, ^v
Sleep, 500 ; 防止没有粘贴完毕剪贴板就被恢复了
Clipboard := clipBak ; 恢复剪贴板
}

posted @ 2021-11-20 22:21  三号小玩家  阅读(251)  评论(0编辑  收藏  举报
Title
三号小玩家的 Mail: 17612457115@163.com, 联系QQ: 1359720840 微信: QQ1359720840