一些快捷键的说明

esc和capslock互换

$CapsLock::ESC
$ESC::CapsLock

快捷键

^+m::WinMaximize, A ; 设置一个快捷键来最大化当前窗口
^1::WinMinimize, A ;设置一个快捷键来最小化当前窗口

;ctrl+c设置为esc
^c::
Send {ESC}
return

;删除键
^h::
Send {BackSpace}
return

;行删除键 其中$开头是为了不屏蔽^u的本来的键值
$^u::
WinGetClass, class, A
if (class="PuTTY")
{
Send ^u
}
else
{
Send {shift}+{home}{BackSpace}
}
return

;Ctrl + j改为回车
^j::
Send {Enter}
return

;重命名
^+r::
Click right
Send {M}
return

;新建文本文档
^+t::
Click right
loop 2
{
Send {up}
}
Send {right}
loop 7
{
Send {down}
}
Send {Enter}
return

;打开bash
^!b::
Click right
Send {g}{down}{enter}
return

;打开关闭桌面
^!+t::
Click right
Send {v}{d}
return

打开网页

;https://mp.csdn.net/console/article
;打开百度
^!w::Run http://www.baidu.com
;http://ehall.cqupt.edu.cn/new/index.html
;打开qq音乐
^!y::run "D:\qqmusic\QQMusic.exe"
;打开有道词典
^!0::run "D:\Dict\YoudaoDict.exe"
;打开钉钉
^!d::run "D:\DingDing\DingtalkLauncher.exe"
return
;打开keil “D:\Keil\UV4\UV4.exe”
^!k::run "D:\Keil\UV4\UV4.exe"
return

;windows快捷键
vscode
^!c::
run "F:\Microsoft VS Code\Code.exe"
return


最小化当前窗口
^1::WinMinimize, A ;设置一个快捷键ctrl + 1来最小化当前窗口,其中
A的含义如下

最大化窗口

vim
^j::send,{left}
^l::send,{right}
^i::send,{up}
^k::send,{down}
+^j::send,{shift}+{left}
+^l::send,{shift}+{right}

win10启动文件夹:

%programdata%\Microsoft\Windows\Start Menu\Programs\Startup

将autohotkey文件放入此文件夹中,即可开启自启动

;$CapsLock::ESC
;$ESC::CapsLock;重命名
^+r::
Click right
Send {M}
return
;新建文本文档
^+t::
Click right
loop 2
{Send {up}
}
Send {right}
loop 7
{Send {down}
}
Send {Enter}
return;打开bash
^!b::
Click right
loop 8
{Send {up}
}
Send {Enter}
return
;Ctrl + j改为回车
^j::
Send {Enter}
return
;Ctrl + c改为ESC
;^c::
;Send {ESC}
;return;删除键
$^h::
WinGetClass, class, A
if (class="PuTTY" or class="vwr::CDesktopWin")
{   Send ^h
}
else
{Send {BackSpace}
}
return;删除键
$^u::
WinGetClass, class, A
if (class="PuTTY" or class="vwr::CDesktopWin")
{   Send ^u
}
else
{Send {shift}+{home}{BackSpace}
}
return;打开文章
^!w::Run https://www.baidu.com
;打开qq音乐
^!y::run "D:\qqmusic\QQMusic.exe"
;打开有道词典
^!0::run "D:\Dict\YoudaoDict.exe"
;打开钉钉
^!d::run "D:\DingDing\DingtalkLauncher.exe"
;打开VM
^!v::run "F:\VMWare\vmware.exe"
^1::WinMinimize, A  ;设置一个快捷键来最小化当前窗口;快速打开文件夹
;用run打开
;+!e::
;Run ,C:\Users\WILLPOWER\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools\Run
;Sleep, 300
;Send E:\ {Enter}
;return+!e::
Run ,E:\
return+!c::
Run ,c:\
return+!d::
Run ,d:\
return+!g::
Run ,G:\
return+!w::
Send efr32MG21A020F
return;配合沙拉查词
$+!q::
Send ^c
Send +!q
return #If MouseIsOver("ahk_class Shell_TrayWnd") or MouseIsOver("ahk_class Shell_SecondaryTrayWnd")
WheelUp::Send {Volume_Up}
WheelDown::Send {Volume_Down}MouseIsOver(WinTitle) {MouseGetPos,,, Winreturn WinExist(WinTitle . " ahk_id " . Win)
}

鼠标右键+滚轮提供音量控制
出处

;使用:按住鼠标右键,滑动滚轮调节音量。
;2010.04.12
;NiGH优化.
#MaxThreads 6
#InstallKeybdHook
color1 = 6BD536
color2 = FFFFFF
color3 = 94632D
color4 = FFCD00
color5 = AA55AA
color6 = FF5555
random,n,1,6
barcolor := color%n% ;取随机色的写法,我会看下色彩的理论,再写出随机生成颜色的代码,因为我还不知道计算明度跟饱和度的公式.
current := 80 ;初始音量值
gui,1:-caption +alwaysontop +owner ;去标题栏
gui,1:margin,0,0 ;去边距
gui,1:color,3F3F3F ;随便设置一个背景色,以备后面设置透明用
gui,1:font,s16 cwhite,Arial
gui,1:add,text,x7 y0,-
gui,1:add,text,x190 y1,+
gui,1:add,progress,x21 y2 w165 h22 c%barcolor% background3F3F3F vMyProgress, 80
gui,1:show,w208 h26,mainboard
;~Gui,1:+LastFound ;设置为LastFound
;~GUI_ID:=WinExist() ;获得窗口的句柄
winset,TransColor,black 200,mainboard
gui,1:Hide
send, {volume_up 50}
send, {volume_down 10} ;我的win7用volume_up&down,效果出来都是双倍的,up10就是加20,下同
SetTimer, Check, 50
SetTimer, MenuCancel, 30
Return
Check:
GetKeyState,T,Rbutton
If (T = "U")
{
;~DllCall("AnimateWindow","UInt",GUI_ID,"Int",500,"UInt",0x90000)  ;以淡出的方式退出
Gui,1:hide
SetTimer, MenuCancel, Off
}
If (current > 100)
current := 100
If (current < 0)
current := 0
Return
MenuCancel:
IfWinExist,ahk_class #32768
WinClose,ahk_class #32768 ;在右键菜单出现时关闭它(因为它会遮盖住音量条).
Return
#IfWinExist, mainboard
wheeldown::
If (T = "D")
{
SetTimer, MenuCancel, On
Loop,5
{current:=current-2GuiControl,,MyProgress,%current%Sleep 50
}
Send {Volume_Down 5}
}
Return
WheelUp::
If (T = "D")
{SetTimer, MenuCancel, OnLoop,5{current:=current+2GuiControl,,MyProgress,%current%Sleep 50}Send {Volume_Up 5}
}
Return#IfWinnotExist, mainboard~wheeldown::If (T = "D"){SetTimer, MenuCancel, Ongui,1:showLoop,5{current:=current-2GuiControl,,MyProgress,%current%Sleep 50}Send {Volume_Down 5}}Return~WheelUp::If (T = "D"){SetTimer, MenuCancel, Ongui,1:showLoop,5{current:=current+2GuiControl,,MyProgress,%current%Sleep 50}Send {Volume_Up 5}}Return

获取class

loop 10
{WinGetClass, class, AMsgBox, The active window's class is "%class%".
}

pdf

ctrl + j 向下
ctrl + k 向上

;向下ctrl+j
$^j::
WinGetClass, class, A
if (class="classFoxitPhantomPersonal")
{   Send {down}
}
else
{Send ^{j}
}
return;向下ctrl+k
$^k::
WinGetClass, class, A
if (class="classFoxitPhantomPersonal")
{   Send {up}
}
else
{Send ^{k}
}
return
;配合沙拉查词
$+!q::
Send ^c
Send +!q
return F8::
Send ^#{Left}
return ^F8::
Send ^#{Right}
return 

文件管理器获取选择的文件路径

链接

引用变量

%var%

粘贴板

^3::
Send ^c
MsgBox % clipboard
return

搜索选中的词

参考b站晏犹眠
;选中关键字后,同时按下win+b,打开百度搜索=============================

#b::             ;win+bSend ^c      ;输入 ctrl+csleep,100    ;等待100毫秒;根据选中的内容打开百度搜索run https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&rsv_idx=1&tn=92765401_hao_pg&wd=%clipboard%
return

计时器

参考b站晏犹眠

;=============无敌工作神器之终极计时器===============================
^!m::
var := 0
InputBox, time, 请输入一个时间(单位是分)
time := time*60000
Sleep,%time%
loop,16
{var += 180
SoundBeep, var, 500
}
return;======重复执行======================================
;f1::
;   Sleep,300
;   loop,1000 ;逗号后面的是重复执行次数,我设置了1000,不设置就一直执行
;   {;   click
;   Sleep,100
;   if GetKeyState("f1")
;   {;   break
;   }
;   }
;return

鼠标侧键

;侧边前面那个
XButton2::
return
;侧边后面那个
Xbutton1::
return

转换windows路径格式为linux

;转换windows路径为linux
^!c::temp := Clipboardif InStr(temp,":\")Clipboard := Strreplace(temp,"\","/")
return

发送`

$^ESC::
Send ^``
return

获取鼠标位置

注意coordmode的限定
其中

TargetType
The type of target to affect. Specify one of the following words:ToolTip: Affects ToolTip.Pixel: Affects PixelGetColor, PixelSearch, and ImageSearch.Mouse: Affects MouseGetPos, Click, and MouseMove/Click/Drag.Caret: Affects the built-in variables A_CaretX and A_CaretY.Menu: Affects the Menu Show command when coordinates are specified for it.
RelativeTo
The area to which TargetType is to be related. Specify one of the following words (if omitted, it defaults to Screen):Screen: Coordinates are relative to the desktop (entire screen).Relative: Coordinates are relative to the active window.Window [v1.1.05+]: Synonymous with Relative and recommended for clarity.Client [v1.1.05+]: Coordinates are relative to the active window's client area, which excludes the window's title bar, menu (if it has a standard one) and borders. Client coordinates are less dependent on OS version and theme.

其中ToolTip和mouse都是类型

#Persistent
CoordMode, ToolTip, screen
SetTimer, WatchCursor, 100
returnWatchCursor:
CoordMode, mouse, Screen ; Coordinates are relative to the desktop (entire screen).
MouseGetPos, x_1, y_1, id_1, control_1CoordMode, mouse, Window ; Synonymous with Relative and recommended for clarity.
MouseGetPos, x_2, y_2, id_2, control_2CoordMode, mouse, Client ; Coordinates are relative to the active window's client area
MouseGetPos, x_3, y_3, id_3, control_3ToolTip, Screen: `t`tx %x_1% y %y_1%`t(Ctrl+Shift+S)`nWindow: `tx %x_2% y %y_2%`t(Ctrl+Shift+W)`nClient: `t`tx %x_3% y %y_3%`t(Ctrl+Shift+C)`n(Ctrl+Esc) to exit, % A_ScreenWidth-200, % A_ScreenHeight-200
return^+S::
Clipboard := x_1 "; " y_1
return^+W::
Clipboard := x_2 "; " y_2
return^+C::
Clipboard := x_3 "; " y_3
return^Escape::
ExitApp
Return;鼠标
^!q::
CoordMode, Mouse, Screen
MouseGetPos, xpos, ypos
Click 3724,999;
Click %xpos%,%ypos%; 还原
sleep 1
return

AHK的快速使用(兼容linux一些操作)相关推荐

  1. Linux及操作系统介绍

    Linux及操作系统介绍 操作系统的作用 五大基本功能 (1)进程和线程的管理:进程线程的状态.控制.同步互斥.通信调度等 (2)存储管理:分配/回收.地址转换.存储保护等 (3)文件管理:文件目录. ...

  2. 黑马程序员C语言基础(第一天)(linux相关操作)

    https://www.bilibili.com/video/BV15W411K7k6?from=search&seid=13128510821569574582 文章目录 操作系统地位 Un ...

  3. 快速入门虚拟机+linux安装(附带视频)

    配合视频食用更佳哦~ 01_虚拟机+Linux 快速入门 02_手把手教你安装centos7(不会你来打我) 这是bai du yun 群链接,存放UP主视频中的那个"开箱即用"虚 ...

  4. 如何高效快速地在Linux系统上部署Node.js+Express+MySQL的开发环境(桌面可视化)...

    一.前言 可能一些初级前端和我一样,在有些项目需要前后台都一个人打通搞定的时候,对于后台和开发环境的部署还是比较头疼的.特别是Linux系统,由于没有系统接触过,也不太喜欢去记背那么多命令,大部分命令 ...

  5. linux文件操作管理,linux 文件管理操作入门

    mkdir -p /root/kali/bp/shell  一路创建文件夹直到生成文件夹shell,中间没有kali文件夹的话也会自动创建生成 tar解压缩 范例一:将整个 /etc 目录下的文件全部 ...

  6. 使用 PSCP将文件从 Windows 计算机快速传输到 Linux计算机

    导读 开源的 PSCP 程序可以轻松地在 Windows 和 Linux 计算机之间传输文件和文件夹. 你是否正在寻找一种将文件从 Windows 计算机快速传输到 Linux计算机并再次传输回来的方 ...

  7. 第六章 Linux实际操作——实用指令

    第六章 Linux实际操作--实用指令 6.1 指定运行级别 6.2 找回root密码 6.3 帮助指令 6.3.1 man获得帮助信息 6.3.2 help指令 6.3.3 搜索引擎帮助更直接 6. ...

  8. 天翼云linux版本,天翼云Linux主机操作

    天翼云Linux主机操作 天翼云Linux主机如何操作?前面我们介绍了天翼云Windos主机操作的相关知识,今天我们来说一说天翼云Linux主机操作有哪些情况. 一.Linux云主机(Centos,U ...

  9. Linux Shell操作json工具jq

    Linux Shell操作json工具jq 背景 使用方式 背景 随着后台项目的开发,json协议的可视性好,组装与解封装的工具在各个平台都比较完备,所以能通过shell快速组装与解封装json能大大 ...

最新文章

  1. 作为一个新人,怎样学习嵌入式Linux?
  2. 领导和管理?你一定要分得清!
  3. OpenStack 实现技术分解 (7) 通用库 — oslo_config
  4. 开机黑屏 仅仅显示鼠标 电脑黑屏 仅仅有鼠标 移动 [已成功解决]
  5. php里怎么添加计时器,如何使用php显示计时器?
  6. mysql 8核16g参数优化_问个 MySql 优化问题, 16G, 8 核服务器??
  7. SpringBoot整合阿里云OSS上传文件
  8. springboot03-unittest mockmvc单元测试
  9. python软件测试工程师岗位多_软件测试工程师常见的17道Python面试题【多测师_王sir】...
  10. lumen mysql 事务_数据库事务不执行回滚?
  11. latex 论文模板
  12. 空间波束形成matlab仿真,自适应波束形成Matlab仿真
  13. 呼叫压力测试软件,MyComm呼叫中心压力测试解决方案
  14. html设置带边框九宫格,CSS九宫格带边框的多种实现
  15. 【JIRA学习】 研发项目管理工具工时管理-插件Tempo
  16. 微信小程序导入Bmob后端云的步骤
  17. 苹果手机怎么创建php,怎么在苹果官网注册Apple ID?在网页上创建Apple ID教程
  18. xmlserializer_更改XmlSerializer输出临时程序集的位置
  19. mysql数据同构_异构、同构 异步、同步
  20. Java7 的Random伪随机数和线程安全的ThreadLocalRandom

热门文章

  1. UWB室内定位技术,定位精度高抗干扰能力强,超宽带技术发展
  2. 为何现在响应式编程在业务开发微服务开发不普及
  3. leetcode,codevs初体验+一些感想
  4. Python 获取最近一年的月份
  5. 100321 ~ 100328
  6. 谈谈盲盒小程序开发的核心功能,以及盲盒小程序未来的市场
  7. 无忧资源库(电子书籍)
  8. 用pageOffice控件实现 office word文档 强制留痕编辑Word
  9. APP推广八大获客模式!
  10. 将一个循环小数转换成分数