AutoHotKey

How can I read multiple lines of user input in AutoHotkey?

寵の児 提交于 2019-12-22 10:27:26
问题 I have an AutoHotkey script which needs to read multiple lines of employee data from a user. InputBox, userInput, Employee Records, Please enter employee records. (One per line) Unfortunately, an InputBox only allows users to enter a single line of text. Trying to add newlines with Enter will instead submit whatever data has been entered. How can I take in multiple lines of user input in an AutoHotkey script? 回答1: This implements a generic multiline input function F3::MsgBox % MultiLineInput(

Why does AutoHotkey respond with a “System cannot find the file” error?

点点圈 提交于 2019-12-22 08:10:17
问题 I'm new to AutoHotkey and cannot understand why this script is giving me the error: Failed to launch program or document Action: <C:\Windows\System32\msg.exe> Params: <* "Initiated."> Specifically: The system cannot find the file specified. Here is the simple script in my test.ahk file: Run, "C:\Windows\System32\msg.exe" * "Initiated." I've verified that the msg.exe file is in the c:\Windows\System32 folder and I can run it without the script from both a command prompt and by clicking on the

Hotkey to remap keys does not trigger hotstring

断了今生、忘了曾经 提交于 2019-12-22 00:06:50
问题 I have a hotkey and hotstring that don't seem to work together: 9::( :?ob0:(::){left 1} To give some context, in one part of the code I remapped all the symbols to the number below them and vice versa so 9 prints the parenthesis ( . Later on I put a hotstring that would type a closed parenthesis after an open one and then places the cursor in between. Seems simple enough because they both work individually but together when I press the key for 9 and press the Spacebar I only get the open

Autohotkey How to hold a mouse button while a key is pressed?

萝らか妹 提交于 2019-12-21 12:42:24
问题 In short: How do I write an autohotkey script so that when I press, say, F1, it presses the mouse button down and only lets it go after I let go of the key? I did some research on both autohotkey forums (which redirect here for asking questions) and read through the documentation, but I'm no programer and have a difficult time grasping loops. I tried doing while or if(getkeystate("F1") loops but I kept getting it wrong until finally I've ended up with this script, which almost works. F2:

Autohotkey window appear event

蹲街弑〆低调 提交于 2019-12-21 12:08:45
问题 I'm using WorkRave rest reminder and want to turn off my screen when the rest window appears. I know how to turn it off. How create an event when specified window (#IfWinActive ahk_class ...) appears? Also, can i bind % symbol? {%} doesn't work, instead of other ones. 回答1: To have an instant notification of a window appearing, use a Shell Hook. This is sometimes so fast that autohotkey can react before you even see the window yourself. A shell hook is demonstrated on the AutoHotkey Forum. An

How to concatenate a number and a string in auto hotkey

拥有回忆 提交于 2019-12-21 07:34:04
问题 I have the following auto hotkey script: A:= 5 B := "7" C := A.B MsgBox %C% The third line does not work. I'm expecting output of "57" I have tried the following: C := %A%.%B% C := (A).(B) C := (A.B) C := (%A%.%B%) C := (%A%).(%B%) None of which work Can anyone tell me how to do it? I'm using version 1.1.09.04 Just updated to latest version 1.1.14.01 and its still the same 回答1: You have distinguish between expressions ( := ) and "normal" value assigments ( = ). Your goal can be met with

How to concatenate a number and a string in auto hotkey

只谈情不闲聊 提交于 2019-12-21 07:33:46
问题 I have the following auto hotkey script: A:= 5 B := "7" C := A.B MsgBox %C% The third line does not work. I'm expecting output of "57" I have tried the following: C := %A%.%B% C := (A).(B) C := (A.B) C := (%A%.%B%) C := (%A%).(%B%) None of which work Can anyone tell me how to do it? I'm using version 1.1.09.04 Just updated to latest version 1.1.14.01 and its still the same 回答1: You have distinguish between expressions ( := ) and "normal" value assigments ( = ). Your goal can be met with

How do I use Unicode in AutoHotKey?

戏子无情 提交于 2019-12-20 11:18:42
问题 I am trying to make two hyphens trigger a short dash, and three hyphens trigger a long dash; like :*?:---=::— :*?:--=::– except working. Here is where I have gotten to: :*?:11:: SendLevel 1 Send 2 return SendLevel 0 :*?:21::3 this works (11 produces 2, 111 produces 3) :*?:--:: SendLevel 1 Send – return SendLevel 0 :*?:–-::— This is the same script, but ‘1’ has been replaced by ‘-’, ‘2’ has been replaced by ‘–’, and ‘3’ has been replaced by ‘—’—“--” should produce “–” and “---” should produce

Autohotkey alternative for Mac OS X? [closed]

ⅰ亾dé卋堺 提交于 2019-12-20 09:47:45
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . This question has been asked before but with no answer. I'm running into brick walls with google too. Program can either be free or paid. 回答1: Keymando - $19, 30-day free trial. Uses Ruby as its scripting language. IronAHK will run AHK scripts, but for its GUI it requires X11.app. I don't believe it can automate

Autohotkey Replace 2 specific character with one

廉价感情. 提交于 2019-12-20 07:35:08
问题 I am beginner with autohotkey. I wanted make script which checks if I write ":)" and then it replaces with this "😊" (emoji in web.whatsapp) I dont know if it's possible to do using GetKeyState because in my keyboard I need Shift+dot for ":" and Shift+9 for ")". I am sorry about my bad english. Hope you understand. :) Thank you. Code that works (thank Forivin) :::):: clipSave := ClipboardAll Clipboard := "😊" ; Send, ^v Clipboard := clipSave Return :::D:: clipSave := ClipboardAll Clipboard :=