AutoHotKey

Mimic Sublime Text 2 multi select (multi cursor) in Notepad++ using autohotkey

天涯浪子 提交于 2020-01-02 19:30:39
问题 In sublime text 2 you can multi select(cursor) lines by holding ctrl+alt+arrow key (up/down). In notepad++ you can accomplish the same thing by holding ctrl and clicking the additional lines(areas) you would like to edit. I figured I could use a autohotkey script to accomplish the same functionality. So I tried #IfWinActive, ahk_class Notepad++ ^!Down::^Click but each time that I try to load the script I get Error at Line 2 Line Text: ^Click Error: This line does not contain a recognized

How to map arrow keys with an AutoHotKey script like Vim?

╄→尐↘猪︶ㄣ 提交于 2020-01-01 19:41:54
问题 Referring to question Windows 7 Map CTRL + j to the Down Arrow Key How can I map the arrow keys with AutoHotKey like vim? Ctrl+h = Move left Ctrl+j = Move down Ctrl+k = Move up Ctrl+l = Move right 回答1: Make an AutoHotKey-script like this: ^h:: Send, {Left down}{Left up} Return ^j:: Send, {Down down}{Down up} Return ^k:: Send, {Up down}{Up up} Return ^l:: Send, {Right down}{Right up} Return 来源: https://stackoverflow.com/questions/31425458/how-to-map-arrow-keys-with-an-autohotkey-script-like

AutiHotKey Some key combinations are not intercepted (ex 3,4,5)

情到浓时终转凉″ 提交于 2020-01-01 18:53:48
问题 I want to remap the keyboard in the following mode: 2::ctrl 3::shift 4::alt 5::tab My problem is that pressing at the same time 3,4,5 (equivalent to pressing alt shift tab) does not work. After investigating a little I have found that ahk can not catch some keys when being pressed together (2,3,e OR 3,4,5). Here is my code through which I have found out this 2:: tooltip 2 sleep 500 tooltip return 3:: tooltip 3 sleep 500 tooltip return 4:: tooltip 4 sleep 500 tooltip return 5:: tooltip 5 sleep

Automatically reload AutoHotkey script when modified

非 Y 不嫁゛ 提交于 2020-01-01 10:35:08
问题 When testing AutoHotkey scripts, I sometimes forget to reload my scripts after making changes. This leads to me accidentally testing old, outdated versions of my scripts. Instead of manually reloading the script, I would like to have scripts automatically reload if they have been modified. How can I make AutoHotkey reload the current script any time a .ahk file is modified? 回答1: Somewhere near start of script, in the auto-execute section #SingleInstance force FileGetTime ScriptStartModTime,

Global variable does not have global scope

拟墨画扇 提交于 2020-01-01 08:27:35
问题 supposedlyGlobalVariable := "blah" ARoutine() { localVariable := "asdf" MsgBox, The global variable value is %supposedlyGlobalVariable%. The local variable value is %localVariable%. } ^!X:: ;This assigns the hotkey CTRL + ALT + X to run the routine ARoutine() return Run the code and the result is: "The global variable value is . The local variable value is asdf." The documentation states: Variable scope and declarations: With the exception of local variables in functions, all variables are

Win下最爱效率利器:AutoHotKey

时光毁灭记忆、已成空白 提交于 2019-12-27 00:11:09
AutoHotkey 是一个windows下的开源、免费、自动化软件工具。它由最初旨在提供键盘快捷键的脚本语言驱动(称为: 热键 ),随着时间的推移演变成一个完整的脚本语言。但你不需要把它想得太深,你只需要知道它可以简化你的重复性工作,一键自动化启动或运行程序等等;以此提高我们的 工作效率 ,改善 生活品质 ;通过按键映射,鼠标模拟,定义宏等。 如觉此处排版不尽如你意,可移步 Win下最爱效率神器:AutoHotKey 查看,(^^)。 如要问__AutoHotKey__是什么?这是一个仁者见仁,智者见智的问题。你可以将其看作是一个热键增添器,也可以当成改键器/屏幕录制器,或者是游戏热键外挂等等。你可以在 AutoHotkey 擅长什么? 得到一个方向;笔者这里只是介绍一些粗浅却很实用的用法,与诸君分享。 下载安装AutoHotkey 在浏览器中输入网址 http://www.autohotkey.com/ 进入AutoHotkey的官网,点击“download”下载即可将AutoHotkey保存到本地磁盘。接着双击点击安装就可以了。 建立AutoHotkey脚本 安装完成后默认会在系统盘的“本地文档”下创建一个"AutoHotkey.ahk"脚本,双击以后我们会看到任务栏右下角有个图标,就表示它在运行了[如下图标注处所示]。我们在里面写入相应的映射代码然后右击选择" reload

AutoHotKey ControlGet

ぐ巨炮叔叔 提交于 2019-12-25 18:44:39
问题 I have a script that is throwing and error when I issue a ControlGet. OtPtVar := AfxWnd422 strMPP := Material Planning Profile ControlFocus,%OtPtVar%,,%strMPP% Control,Show,,%OtPtVar%,,%strMPP% These all work but when it gets to the next line it throws an error: ControlGet,sysList,List,,%OtptVar%,,%strMPP% The control is a grid with five fields row number,Part,Description,Time,Lateness. `ControlFocus,%OtPtVar%,,%strMPP%` `Control,Show,,%OtPtVar%,,%strMPP%` `ControlGet,sysList,List,,%OtPtVar%,

AutoHotKey - clik on image

微笑、不失礼 提交于 2019-12-25 17:18:53
问题 I'd like to change send {Browser_Back} to a mouse click in a specific image / or a specific point (pixel). SendMode , Input SetMouseDelay , -1 SetBatchLines , -1 Loop { ImageSearch ,,, 0 , 0 , A_ScreenWidth , A_ScreenHeight , mor.png bT := ErrorLevel ? bT : 1 ImageSearch ,,, 0 , 0 , A_ScreenWidth , A_ScreenHeight , NewPic2.png bT := ErrorLevel ? bT : 1 ImageSearch ,,, 0 , 0 , A_ScreenWidth , A_ScreenHeight , NewPic3.png bT := ErrorLevel ? bT : 1 If bT { bT := 0 Send , {Browser_Back} Sleep ,

AutoHotKey - clik on image

雨燕双飞 提交于 2019-12-25 17:18:40
问题 I'd like to change send {Browser_Back} to a mouse click in a specific image / or a specific point (pixel). SendMode , Input SetMouseDelay , -1 SetBatchLines , -1 Loop { ImageSearch ,,, 0 , 0 , A_ScreenWidth , A_ScreenHeight , mor.png bT := ErrorLevel ? bT : 1 ImageSearch ,,, 0 , 0 , A_ScreenWidth , A_ScreenHeight , NewPic2.png bT := ErrorLevel ? bT : 1 ImageSearch ,,, 0 , 0 , A_ScreenWidth , A_ScreenHeight , NewPic3.png bT := ErrorLevel ? bT : 1 If bT { bT := 0 Send , {Browser_Back} Sleep ,

Autohotkey - Barcode Macro - How to trigger a script if a certain barcode was scanned?

这一生的挚爱 提交于 2019-12-25 17:05:07
问题 I would like to create barcode macros - if the user scans a certain barcode, that would run a script. The barcode can be any character string, just to trigger the script. Any ideas? Thanks in advance! 回答1: To run a script based on a specific input (e.g. keyboard) do this: Example of scanned string: asdkffasdf :?*:asdkffasdf:: SoundBeep, 500,500 MsgBox, String asdkffasdf has been scanned Return 来源: https://stackoverflow.com/questions/15177112/autohotkey-barcode-macro-how-to-trigger-a-script-if