• 【AHK】不常用操作备份笔记


    一些改良68键使用的习惯

    
    #!1:: ;主要用于截图
    send {f1}
    return
    
    #!2:: ;主要是用于重命名
    send {f2}
    return
    
    #!q:: ;【用鼠标手势代替更快】贴图的快捷键 
    send !{f1}
    return
    
    
    
    	
    ;!4::
    ;send,!{f4}
    ;return
    
    ;!5::
    ;send,!{f5}
    ;return
    
    !r::
    send ^r ;【用鼠标手势代替更快】览器刷新用/ 
    return
    
    !t::
    send ^+t ;【用鼠标手势代替更快】览器刷新用/ 
    return
    
    !f::
    send,^{f}
    return
    
    !h::
    send,^{h}
    return
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40

    一些可有可无的多媒体设置

    
    ^xbutton1:: ;标签页操作
    send ^{tab}
    return
    
    ^xbutton2::
    send ^+{tab}
    return
    
    #wheelup:: ;多媒体操作
    send {Volume_Up 2}
    return
    
    #wheeldown::
    send {Volume_Down 2}
    return
    
    
    +wheelup::
    send {left}
    return
    
    +wheeldown::
    send {right}
    return
    
    
    ~capslock & wheelup::
    send {left}
    return
    
    ~capslock & wheeldown::
    send {right}
    return
    
    #IfWinActive ahk_exe potplayermini64.exe
    
    a::left
    d::right
    s::down
    w::up
    
    wheelup::left
    wheeldown::right
    mbutton::space
    
    #IfWinActive
    
    ~esc & F1:: ;网易云全局控制键
    send ^!+p
    return
    
    ~esc & F2:: ;网易云全局控制键
    send ^!{left}
    return
    
    ~esc & F3:: ;网易云全局控制键
    send ^!{right}
    return
    
    
    +pgup:: send {Wheelup}{Wheelup}{Wheelup}
    
    +pgdn:: send {Wheeldown}{Wheeldown}{Wheeldown}
    
    !pgup:: send {Wheelup}{Wheelup}{Wheelup}
    
    !pgdn:: send {Wheeldown}{Wheeldown}{Wheeldown}
    
    
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71

    触摸板习惯修改——控制窗体

    
    ;+#z:: ;调整窗体大小
    ;CoordMode Mouse, screen
    ;id := WinExist("A")
    ;WinGetPos x, y, width, height, ahk_id %id%
    ;MouseGetPos mx, my
    ;neww := width  + x - mx
    ;newh := height + y - my
    ;WinMove % "ahk_id" id,, mx, my, neww, newh
    ;return
    
    ;#z:: ;调整窗体位置
    ;Send !+{space}
    ;WinWait , ahk_class #32768 ,, 1 ; Waits 1s for menu to exist
    ;If !ErrorLevel ; ErrorLevel is 0 if menu exists
    ;    Send {down}{enter}
    ;return
    
    
    ;+#a:: ;居中窗口
    ;WinGetActiveTitle, var_title
    ;CenterWindow(var_title)
    ;return
    
    ;CenterWindow(WinTitle)
    ;{
    ;    WinGetPos,,, Width, Height, %WinTitle%
    ;    WinMove, %WinTitle%,, (A_ScreenWidth/2)-(Width/2), (A_ScreenHeight/2)-(Height/2)
    ;}
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30

    一些可有可无的搜索设置

    
    ^!b:: ;
    clipboard =   ; 清空剪贴板
    ;send,{home}{shiftdown}{end}{shiftup} ;复制当前行到剪切板
    send,^c
    ;send, {end}
    run https://www.baidu.com/s?ie=UTF-8&wd=%clipboard% ;用google搜索剪切板的内容
    tooltip, 那晚,风也美,人也美。。。
    sleep 1500
    tooltip,
    return
    
    ^!g:: ;
    clipboard =
    send,^c
    run https://www.google.com/search?q=%clipboard% ;用google搜索剪切板的内容
    tooltip, 那晚,风也美,人也美。。。
    sleep 1500
    tooltip,
    return
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21

    屏蔽窗口操作

    #IfWinActive ahk_class SubscriptionWnd
    
    WinSet, Transparent, 10, ahk_class SubscriptionWnd
    WinMinimize, A
    
    lbutton:: ;微信订阅号屏蔽微信订阅号屏蔽
    esc::
    WinSet, Transparent, 10, ahk_class SubscriptionWnd
    WinMinimize, A
    return
    
    #IfWinActive
    
    
    
    #IfWinActive ahk_class UpdateWnd
    
    rbutton:: ;点击关闭微信更新提示
    lbutton::
    WinSet, Transparent, 50, ahk_class UpdateWnd
    send !{f4}
    return 
    
    #IfWinActive
    
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26

    自动补全

    
    :*:reg::
    clipboard = regedit
    send,^v
    return
    
    
    :*:\alpha::
    clipboard =α
    send,^v
    return
    
    :*:\beta::
    clipboard =β
    send,^v
    return
    
    :*:\gamma::
    clipboard =γ
    send,^v
    return
    
    
    :*:flag::
    clipboard =🚩
    send,^v
    return
    
    :*:smile::
    clipboard =😄
    send,^v
    return
    
    
    sendASC(str){
    Send % "{ASC 0" . Asc(str) . "}"
    }
    
    !,:: sendASC(",")
    !.:: sendASC(".")
    
    !+,:: sendASC("<")
    !+.:: sendASC(">")
    
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45

    快捷打开程序

    
    #c::Run *RunAs cmd ,,
    
    #F::Run C:\Program Files (x86)\Feem 2018\Feem.exe
    #T::Run C:\Program Files\Typora\Typora.exe
    #N::Run notepad
    
    
    ^#p::Run D:\软件\AdobePhotoshopCS4\Adobe Photoshop CS4\Photoshop.exe
    ^#e::Run "D:\软件\小工具2\Everything-1.4.1.1022.x86\Everything.exe"
    ^#h::run D:\软件\HBuilderX\HBuilderX.exe
    
    
    ^!k::Run Notepad D:\软件\AHK文件\AHK常用快捷.ahk
    
    
    #[:: ;查看蓝牙电量用
    run ms-settings:bluetooth
    return
    
    #]::
    ;run C:\【不要删】打开wifi列表
    run ms-settings:network-wifi
    sleep 1000
    send {tab}{enter}
    return
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27

    系统日常操作

    
    ^+home::^end ;84键专用
    
    ~right & home:: send {end} ;右键专属用于调整
    
    
    #F1::#.
    
    #F2:: ;关闭显示器
    Sleep 1000  ; 让用户有机会释放按键 (以防释放它们时再次唤醒显视器).
    , 0x112, 0xF170, 2,, Program Manager  ; 0x112 为 WM_SYSCOMMAND, 0xF170 为 SC_MONITORPOWER.
    return
    
    #F4:: ;休眠
    DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0)
    Return
    
    #F3::SendMessage, 0x0112, 0xF140, 0,, Program Manager
    ;#F3:: Run, open Ribbons.scr ;进入屏保
    
    
    
    
    
    #IfWinActive ahk_exe explorer.exe
    
    ^+s::send +{f10}w{down}{enter} ;创建快捷方式(组合键学习例子)
    ^+!p:: send !fr ;在某个文件夹下面直接打开powershlll
    
    #IfWinActive
    
    
    
    
    
    
    judgeActivate(winName , exeName){
    SetTitleMatchMode 2
    If WinExist(winName){
    		if WinActive(){
    			WinMinimize
    			return
    		}
    		WinActivate
    		 sleep,500
    		return
    	}
    	else{
    		run % exeName
    		return
    	}
    }
    
    ^#d::
    judgeActivate("ahk_exe Q-Dir.exe","D:\学习专用分区.qdr")
    return
    
    ^#i::
    judgeActivate("Edge","msedge")
    return
    
    #a::
    judgeActivate("ahk_exe haoyongbianqian.exe","D:\软件\小工具3\haoyongbianqian\haoyongbianqian.exe")
    return
    
    #w::
    ;send ^!w
    return
    
    #q::
    send ^!z
    return
    
    
    
    ^+f5:: ;任务栏固定
    send #b
    sleep 500
    send +{F10}
    sleep 500
    send tt{enter}
    sleep 2000
    send {tab 3}{space}
    sleep 500
    send !{F4}
    return
    
    
    
    #IfWinActive ahk_exe quicklook.exe 
    
    ^=:: 
    sleep 1000
    send {ctrl down}{wheelup}
    sleep 100
    send {ctrl up}
    sleep 100
    return
    
    ^-:: ;
    sleep 1000
    send {ctrl down}{wheeldown}
    sleep 100
    send {ctrl up}
    return
    
    #IfWinActive
    
    
    #If ActiveControlIsOfClass("Edit") ;编辑控件中的轻松删除单词的快捷键.
    ^BS::Send ^+{Left}{Del}
    ^Del::Send ^+{Right}{Del}
    #If
    
    ActiveControlIsOfClass(Class) {
        ControlGetFocus, FocusedControl, A
        ControlGet, FocusedControlHwnd, Hwnd,, %FocusedControl%, A
        WinGetClass, FocusedControlClass, ahk_id %FocusedControlHwnd%
        return (FocusedControlClass=Class)
    }
    
    
    #If MouseIsOver("ahk_class Shell_TrayWnd") ;任务栏上滚动鼠标来调节音量.
    WheelUp::Send {Volume_Up}
    WheelDown::Send {Volume_Down}
    return
    #If
    
    MouseIsOver(WinTitle) {
        MouseGetPos,,, Win
        return WinExist(WinTitle . " ahk_id " . Win)
    }
    
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134

    未测试

    
    ;#lbutton:: ;循环点击操作
    ;while GetKeyState("lbutton","p")
    ;{
    ;	click
    ;	sleep 1000
    ;}
    ;return 
    
    
    ;#1:: ;循环点击操作
    ;loop, 10
    ;{
    ;click
    ;sleep 1000
    ;}
    ;return
    
    
    
    
    
    !e::
    WatchCaret()
    return
    
    WatchCaret(){
      ToolTip, X%A_CaretX% Y%A_CaretY%, A_CaretX, A_CaretY - 20 
    return
    }
    
    ;#Persistent
    ;SetTimer, tag, 50
    ;return
    
    ;tag:
    ;MouseGetPos, x, y, id, control
    ;ToolTip, %x% %y%
    ;if (y > A_ScreenHeight-15 && x > 300 && x < A_ScreenWidth-500){
    
    ;	send {Down}
    ;}
    ;else if(y < 15 && x > 300 && x < A_ScreenWidth-500){
    ;	send {Up}
    ;}
    
    ;return
    
    ;#Persistent ;实时获取当前输入光标的位置.
    ;SetTimer, WatchCaret1, 100    ;设置一个定时器,每100ms 运行一次中间那个标签的内容.  
    ;return
    
    ;WatchCaret1:
    ;  ToolTip, X%A_CaretX% Y%A_CaretY%, A_CaretX, A_CaretY - 20 
    ;return
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
  • 相关阅读:
    CV每日论文--2024.6.25
    Redis<一>-redis简介与安装
    猿创征文|Java计算【生日工具类】看这篇就够了
    C Primer Plus(6) 中文版 第11章 字符串和字符串函数 11.6 字符串示例:字符串排序
    TCC分布式事务----以Hmily框架为例
    java毕业设计花漾网在线商城(附源码、数据库)
    对数据排序
    手机基带芯片往事
    Unity LayerMask 的切换功能的实现
    笔记本电脑热点手机无法连接解决方案
  • 原文地址:https://blog.csdn.net/weixin_35944332/article/details/134356056