AutoHotKey

Holding down the left mouse button in AutoHotkey

感情迁移 提交于 2019-12-04 17:51:19
问题 I want a script where pressing F1 makes AutoHotkey hold down the left mouse button. I then want the script to release the mouse once I press the key again. How can I do that? 回答1: I would use Click down and Click up Click is generally preferred over MouseClick because it automatically compensates if the user has swapped the left and right mouse buttons via the system's control panel. F1:: alt := not alt if (alt) { Click down } else { Click up } Return 回答2: Here is a one-liner in case anyone

Does anyone have a Notepad++ plugin that will generate UUIDs and insert them

那年仲夏 提交于 2019-12-04 17:38:28
问题 I Often need UUIDs inserted into files that I'm editing in Notepad++. Does anyone have a macro or add in that does this. Or an autohotkey script? 回答1: Install the GhNppExec plugin from Plugin Central, then configure to run the simple Python script below. Use the shortcut mapper to assign a key combination to the plugin command. import uuid import sys # make a random UUID sys.stdout.write(str(uuid.uuid4()).upper()) 回答2: NppToolBucket does it very nicely, too. http://sourceforge.net/p/npp

Super simple download with progress bar

折月煮酒 提交于 2019-12-04 15:18:26
Setting up an asynchronous download in AutoHotkey is a pain, but this is is necessary if you want to run some code during the download, like for example updating progress bar. So the question is: Is there a short and simple way of downloading a file with a progress bar, without including huge 1000+ lines libraries? Forivin I came up with that code quite some time ago and you can still find it on the AHK forums, however, why not share it with the Stackoverflow community: DownloadFile(UrlToFile, SaveFileAs, Overwrite := True, UseProgressBar := True, ExpectedFileSize := 0) { ;Check if the file

capturing right-click+left-click with autohotkey; unexpected behaviour

旧街凉风 提交于 2019-12-04 14:35:13
I want to capture the key event "right mouse button pressed, then left mouse button pressed". No problem in autohotkey. However I am having trouble with still allowing the right-mouse key to work alone. 1) this works: RButton & LButton:: Send X Return works as expected: If I press right mouse button, then left mouse button, "X" is sent to the active window right-click event is captured by Authotkey: no context menu appears when I press the right mouse button alone. This is the intended outcome 2) this works ~RButton & LButton:: Send Y Return works as expected: If I press right mouse button,

Relief from backslash irritation in R for Windows

杀马特。学长 韩版系。学妹 提交于 2019-12-04 12:32:37
问题 Early in my R life I discovered the pain of R and windows being on different pages when it came to the separator between directories and subdirectories. Eventhough I know about the problem, I am still pained by manually having to put a backslash in front of all my backslashes or replacing all of them with forward slashes. I love copying a path name or an entire filename with any one of several applications that I have running on my computer (eg. XYPlorer, Everything by voidtools) and then

Alt + Space + key in autohotkey

断了今生、忘了曾经 提交于 2019-12-04 12:08:23
How can I create an Alt + Space + C shortcut in autohotkey? Alt + Space is !space but I don't see how I can add a third key without getting an error. Honest Abe You can use the #If directive (requires AHK_L) in combination with the GetKeyState() function: #If GetKeyState("Alt", "p") Space & c::Traytip,, % a_thishotkey #If or you can use the Keywait command: !space:: keywait, c, d, t0.6 If ErrorLevel Traytip,, Alt and space Else Traytip,, Alt space and c Return This will also trigger an Alt + space outcome after 0.6 seconds if you don't press C . If that is undesirable you can write it like

Send hotkey to minimized chrome window

时光总嘲笑我的痴心妄想 提交于 2019-12-04 11:06:35
I need an autohotkey script that can send alt+backspace to a minimized chrome window (without maximizing it). Basically, I have a web player app I've made and on the player window which opens in a smaller window, you can press alt+backspace and it will mute and unmute while the window has focus. (javascript events) Active Window Info says this: >>>>( TitleMatchMode=slow Visible Text )<<<< player.highstrike.org/play/ I would like script to work only for that url. I have tried to send cmds to that window but to no avail, can someone please help me? I'd really apreciate it. Thank you. The code i

Automatically reload AutoHotkey script when modified

。_饼干妹妹 提交于 2019-12-04 09:35:54
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? Somewhere near start of script, in the auto-execute section #SingleInstance force FileGetTime ScriptStartModTime, %A_ScriptFullPath% SetTimer CheckScriptUpdate, 100, 0x7FFFFFFF ; 100 ms, highest priority Anywhere in the

Make AutoHotKey ignore Alt as menu key

ⅰ亾dé卋堺 提交于 2019-12-04 08:31:37
问题 I'm trying to use autohotkey to simulate elements of Mac keyboard on a PC (Windows) keyboard. My muscle memory reaches for the Command key for simple tasks like copying and pasting, so I'd like to remap the left alt+letter key combinations to appropriate ctrl+letter. <!c::Send ^c Most of the time it works fine, except for part of the time in IE and Office applications. When pressing the left Alt, it screws with the office ribbon/menus (i.e. the menu bar shows in IE, or ribbon letters start

晓亮的文件管理规范2019年11月13日

一世执手 提交于 2019-12-04 07:50:39
晓亮的文件管理规范 2019 年 11 月 13 日 1.1、办公文件 1.2、所有办公文件分类保存在西南办公室台式电脑的桌面上 1.3、使用GoodSync v10 实时同步 西南办公室台式电脑的桌面 D:\Personal\Desktop 到其他物理盘(双向实时同步任务)。 1.4、 使用 “天翼云盘”实时备份西南办公室台式电脑的桌面到云端网盘(单向备份) 1.5、 使用 “腾讯微云”手动拖放上传西南办公室台式电脑的桌面文件到微云网盘(拖放上传) 1.6、文档只采用Word 文件( docx )格式(请使用 WPS Office 2019 专业免激活版编辑)、表格只采用 Excel 文件( xlsx )格式、图片只采用 Photoshop CS6 文件( jpg )格式 2.1 、 娱乐文件 2.2 、国语中字华语电影只用“优酷视频”安卓版应用程序软件缓存下载 到安卓手机 TF 内存卡 中。 2.3 、 MV 歌曲只用“音悦台 MV 解析下载工具”下载到安卓手机 TF 内存卡并用 MX Player 播放器播放。 2.4 、单机电脑游戏只分类保存在随身固态 U 盘的“单机电脑游戏”文件夹中。 2.5 、电脑软件安装包只分类保存在随身固态 U 盘的“电脑软件安装包”文件夹中。 2.6 、 绿色免安装电脑软件只分类保存在随身固态 U 盘的“绿色免安装电脑软件”文件夹中。 3.1