zoukankan      html  css  js  c++  java
  • 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 ; 恢复剪贴板
    }

  • 相关阅读:
    华为交换机批量创建VLAN;端口组配置命令
    不同VLAN下实现网络互相通信(配置ip static静态路由进行数据转发)
    不同VLAN下实现网络互相通信(配置port trunk pvid vlan进行数据转发)
    不同VLAN下实现网络互相通信(配置Vlanif IP进行数据转发)
    Lambda表达式
    mysql安装
    多线程 聊天程序
    程序实现 传输图片
    网络编程 编程聊天小程序
    水印
  • 原文地址:https://www.cnblogs.com/q1359720840/p/15582834.html
Copyright © 2011-2022 走看看