AutoHotKey

How do I suppress an unwanted 'return' character after very simple AHK (AutoHotKey) macro?

落爺英雄遲暮 提交于 2019-12-25 01:29:07
问题 I've redefined all the keys on the numeric keypad to automate programming tasks, including 'cut, 'paste' and 'copy'. But this macro ('paste') fails: ;===== NumpadDot or NumpadDel paste NumpadDot:: NumpadDel:: Send,^v Return Surprisingly this sends a control-v but followed (slightly later) by a 'return/enter' keystroke. What causes AHK to send an extra keystroke and how do I prevent it ? – None of my other macros have any problems. 回答1: Finally discover the issue. I had comments before each

Script to open right-click menu and choose menu item

假装没事ソ 提交于 2019-12-24 20:25:36
问题 In a specific program, I want to assign a hotkey to the action of right clicking at the cursor's current position, then moving the cursor to choose an item on that menu, then moving the cursor again to choose an item on the sub-menu. I've gotten as far as the first two commands. When I get to the mousemove, no matter what coordinates I put in, the cursor shoots to the upper left corner of the screen, when what I would like it to do is first move 100 pixels to the right and 60 pixels up, then

Autohotkey ComObjActive Outlook wrong encoding of umlauts

谁都会走 提交于 2019-12-24 20:16:04
问题 Currently i use Autohotkey to prefill Emails with Text and Attachments. tml_body= ( <html> <body> test </body> </html> ) m := ComObjActive("Outlook.Application").CreateItem(0) m.Subject := "subject with umlauts äüö " m.To := "foo@bar.com" m.CC := "foo@bar.com" m.HTMLBody := html_body m.Display ;m.attachments.add("filepath") WinWait Untitled - Message (HTML) WinActivate Untitled - Message (HTML) Using this script opens a new outlook mail with the following subject "subject with umlauts äüö

Autohotkey to convert dot “.” to space

穿精又带淫゛_ 提交于 2019-12-24 16:09:19
问题 I am looking for a simple AutoHotkey Code to convert dot "." of file name to space Example Hamburger.Hill.1987.BluRay.720p.x264 needs to be converted to Hamburger Hill 1987 BluRay 720p x264 . Start with string: Hamburger.Hill.1987.BluRay.720p.x264.mov Result String: Hamburger Hill 1987 BluRay 720p x264.mov Note the dot before the extension should be retained. Then in a separate operation, remove the string of characters following the 4 digit year. This operation should also remove the file

AutoHotKey JavaScript Link

泄露秘密 提交于 2019-12-24 13:20:35
问题 I'm not familiar with JavaScript and web development, as my experience is in Java and C++ primarily, and I'm even new to that. I'm using AutoHotKey to automate data entry for the company I work for, and in order to get into the form that to fill out a new item, I have to click a link. I've had no problem when the links all had URLs for href values, but now I'm running into one that is a JavaScript link, and I don't know how to click it... here is the code for the link. <a href="javascript:"

AHK script to turn hold buttons into toggle buttons

ⅰ亾dé卋堺 提交于 2019-12-24 12:44:28
问题 For instance the Shift button makes things capitals when you have it held down whereas the Capslock button does the same thing but as a toggle. How can I turn a hold button such as the shift button act like a toggle button like the capslock button? I have tried this: if toggle Send, {LShift down} else Send, {LShift up} LShift:: toggle := !toggle return But it does not work for some reason. I figure that it will lift up or hold down the LShift button depending on the value of toggle which is

Autohotkey script to bookmark to a specific folder

徘徊边缘 提交于 2019-12-24 12:22:13
问题 I'm using Firefox and I was looking for an autohotkey script which would enable me to skip the whole series of clicks when I bookmark a page in a specific folder and replace it with a single keyboard shortcut. Although I've read forum threads on Autohotkey forum and here I still don't know how to make a working script that would reduce bookmarking a page to hitting a keyboard shortcut and the initial letter of the folder where I want to store that page. Using KeyWait command I've made it work

Autohotkey hotkey handlers fall through/continue to lines below

我们两清 提交于 2019-12-24 10:44:31
问题 I’m having some trouble with Autohotkey. I have a script with a few hotkeys but it seems that when a hotkey is pressed, not only does its handler run, but so do all lines below it, including the contents of other hotkey handlers. Below is a demonstrative example. What is the problem? How can I get Autohotkey to execute only the lines specified in the handler? #SingleInstance force ;Main loop While 1 { } ;Hotkeys: ;Quit with Ctrl+Q ^q:: { MsgBox Quitting ExitApp } ^s:: { MsgBox Hotkey1 }

Sending a command when the shortcut exists

吃可爱长大的小学妹 提交于 2019-12-24 09:27:25
问题 I've got a global command like this !i::Send {Up} (pressing alt+I will move the caret up) There is an application that uses Alt+I as a shortcut for an action that I'd like to call while still retaining my own custom shortcut. I'd like to remap this app's action to Ctrl+I Within a proper WinExists, I've tried ^i::Send !{i} but that just moves the caret up. I tried ^i::!i but that sends Ctrl+Alt+I and not Alt+I . Any ideas? Thanks 回答1: Gabe, Try this... SetTitleMatchMode, 2 ; Accept the title

How to grab the scrolling amount in one window?

断了今生、忘了曾经 提交于 2019-12-24 09:07:26
问题 This is the first step to scroll two windows simulteneously, the second step is to find a way to apply that amount to the other program. But I really don't know where to start, all I see in from Google is about modifying the behavior of the scroll of the mouse , not the scrolling amount in one window . Advantages of using this instead of listening to the keys: Scrolling will be seamless since the other program are scrolled in the background Clicking on the scrollbar works Different scrolling