AutoHotKey

How to reset a key sequence with a specific key?

人走茶凉 提交于 2021-01-29 05:53:39
问题 So this sequence resets itself after 1.5 sec which means if i dont hit the left mouse button for 1.5 sec it always sends A. I want to further tweak this code with another function which is to be able to reset it with right mouse button too. So if i hit RButton any time it should reset to A. THX global s:=0, c:=0, t:=1500, t2:=380 *LButton:: Send % Seqkeys("A","B","C") KeyWait, LButton Send, R If (A_TickCount-s < t2) c := 0 return Seqkeys(params*) { global s, c, t max := params.MaxIndex() (A

How to run an autohotkey script in Python (2.7)

柔情痞子 提交于 2021-01-27 14:07:53
问题 I'm trying to run an autohotkey (ahk) script in Python 2.7 but nothing seems to work. All online sources I've found are either outdated or overly complicated. Has anyone found a way of doing this? I just want to run a couple of simple scripts that activates windows and opens applications. E.g: IfWinExist, Command Prompt - python ... WinActivate Update: I've tried downloading pyahk: ahk.start() # Ititializes a new script thread ahk.ready() # Waits until status is True ahk.execute(mw._['cwd']+

AutoHotkey+BUG小狼毫+BUG win10输入法设置的艰难摸索(未完待续)

眉间皱痕 提交于 2020-10-07 06:22:57
第一目标:只用小狼毫输入法(默认英文),由于: AutoHotkey 无法获取 小狼毫 当前是英文还是中文状态,这样在必须要英文的情景下,还需手工切换,不理想。见 https://github.com/rime/weasel/issues/468 但由于小狼毫英文状态下,在gvim中快速输入会 自动转为中文 ,相关 bug 见 https://github.com/rime/weasel/issues/362 https://github.com/rime/weasel/issues/232 ,放弃! 第二目标:英文+小狼毫输入法,需要 AutoHotkey 能获取当前是英文键盘还是小狼毫,这样能实现在不同输入法状态使用不同的鼠标形状 还用到 imetool.exe 小工具,从win7时一直在用的。 英文有美国键盘和英国键盘之分, 但是美国键盘属于 中文系 的,AutoHotkey无法区分当前是小狼毫输入法还是美国键盘输入法 所以就只好用英文键盘了,不爽的就是用小狼毫时,托盘图标会多个 CH 图标(win7时还强迫症用脚本删除该图标,现在只能忍忍) 英文时是单个 EN 图标。 删除英文输入法只剩小狼毫时,又会出现两个小狼毫( BUG ,影响 Win-Space 无脑切换) 实现方式: windows语言只安装中文即可 中文输入法只放小狼毫 imetool 删除所有输入法

How do I stop an active AutoHotkey script?

余生颓废 提交于 2020-08-21 05:57:12
问题 Yesterday while debugging my AutoHotkey script, I accidentally triggered an endless loop of MouseMove and MouseClick events. Every 0.5 seconds my mouse would click random parts of the screen. After unsuccessfully trying to terminate AHK with the task manager, I ended up turning off my computer to end the script. How can I stop an active AutoHotkey script? 回答1: Add an emergency exit hotkey The most reliable method of ending an active script is to pre-emptively include an emergency ExitApp

强大的工具(一):Capslock+ 3.x版本

十年热恋 提交于 2020-08-09 11:36:45
1 概述 作者终于把Capslock+更新到了3.x版本了,所以就更了这篇博客。 2.x版本的可以 戳这里 。 Linux版本的可以 戳这里 。 3.x版本与2.x版本的主要不同是更新了新的键盘布局,更加顺手,下面让我们一起来看一下吧。 2 基础功能 下面的按键都以Capslock+开头,也就是说需要先按着Capslock键,而Alt键无特殊说明指的是左边的Alt键。 2.1 光标移动 按键 效果 E 光标向上移动一次 Alt+E 光标向上移动三次 D 光标向下移动一次 Alt+D 光标向下移动三次 S 光标向左移动一次 Alt+S 光标向左移动五次 F 光标向右移动一次 Alt+F 光标向右移动五次 按键 效果 T 光标向上移动十次 Alt+T 光标向上移动三十次 B 光标向下移动十次 Alt+B 光标向下移动三十次 按键 效果 A 光标向左移动一个单词 Alt+A 光标向左移动三个单词 G 光标向右移动一个单词 Alt+G 光标向左移动三个单词 P 光标移动到行首 Alt+P 光标移动到页首 ; 光标移动到行尾 Alt+; 光标移动到页尾 注意中文不好界定单词的界限,一般会整句跳过。 2.2 光标选择 按键 效果 I 光标向上选中一次 Alt+I 光标向上选中三次 K 光标向下选中一次 Alt+K 光标向下选中三次 J 光标向左选中一次 Alt+J 光标向左选中五次 L

How to start night light via command in Windows 10? [closed]

五迷三道 提交于 2020-08-02 21:19:14
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Improve this question How can I enable immediate light night setting in Windows 10 via a command? This is the setting from inside the "Night light settings" inside "Display" settings, and not the one from "Display" which only enable the general timed setting. Also a command to set the