AutoHotKey

Can Inno Setup send key and mouse presses, if not, how can this be done using an Installer?

雨燕双飞 提交于 2019-12-10 11:25:40
问题 I'm a newbie to both [Microsoft Windows] installers and Inno Setup but I need to know if Inno Setup (or an equivalent) can be used automate the input to a GUI-based windows program, during install, e.g. by clicking on a menu and selecting a sub-item, for instance? I'm aware of AutoIt and AutoHotkey, as well as NSIS, however Inno Setup comes highly recommended as a software packager/installer, and I also like the idea of learning a little Pascal programming, into the bargain ;) Any ideas or

Detect which Taskbar button was clicked (identify target window)

痴心易碎 提交于 2019-12-10 10:05:12
问题 I am trying to figure out how to detect which Taskbar button was clicked. Specifically, I want to write a script that makes it possible to maximize a window by double-clicking its Taskbar button. That requires knowing which Taskbar button was clicked, which I am having a difficult time finding any leads on. Does anyone know how this can be accomplished? 回答1: That's a though one I have to admit. I can't offer you a best practice solution, but here is a little work around, maybe that enough for

AutoHotKey keystroke break loop

ぐ巨炮叔叔 提交于 2019-12-10 04:21:33
问题 Using AutoHotKey, I have a rather simple loop script that I want to be able to break by the stroke of a key. I tried a few different codes from websites but it doesn't seem to work. Here's the code: #g:: Loop 20 { MouseClick, left, 142, 542 Sleep, 1000 MouseClick, left, 138, 567 Sleep, 1500 MouseClick, left, 97, 538 Sleep, 1000 } 回答1: Use a global variable (keepCycling) and toggle it to break the loop. Global variables should be declared in the beginning of a script. 回答2: Adding a global

How to make autohotkey work in “OneNote for Windows 10” app (not OneNote)?

倾然丶 夕夏残阳落幕 提交于 2019-12-09 22:06:07
问题 I am trying to add a program specific shortcut, i.e. a shortcut to be used inside OneNote App only, and not the short cut for the opening of app itself. Here is how the present script is: #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting

Right Click on Tray Icon in Windows 10 with AutoHotKey

女生的网名这么多〃 提交于 2019-12-09 12:55:56
问题 In Windows 7, I had an AutoHotKey script that would automatically Right-Click on a tray icon. #Include %A_Scriptdir%\TrayIcon.ahk TrayIcon_Button("CCC.exe", "R") Which used the TrayIcon.ahk library from FanaticGuru's post. This worked just fine on Windows 7, but no longer works on Windows 10. Is there a way to right click on a TrayIcon in an AutoHotKey script on Windows 10? Here is the TrayIcon_Button function from the library. I refrained from posting the entire library since it is fairly

using ahk to close a pop up dialogue within visual studio

℡╲_俬逩灬. 提交于 2019-12-09 03:45:46
问题 I've remapped a few keys, which has been working fine; however, I'm having a difficult time trying to get rid of a pop up dialogue within visual studio: Here's what I have tried: WinWaitActive, Microsoft Visual Studio If WinActive("Microsoft Visual Studio") { WinGetText, HayStack Needle = "A network-related or instance-specific error" IfInString, Haystack, %Needle% { MsgBox, The string was found. return } else Sleep, 1 } return However, I get no response whatsoever. The entire script

hotkeys does not work when send is in loop

北城余情 提交于 2019-12-08 21:09:26
Assume this code: Loop { if enabled Send, / } m:: enabled := !enabled Return I want to toggle sending / to a Notepad for example. But if I run this code by pressing M on keyboard, then pressing the M key again does not disable sending. Looks like the send command in the Loop cause this issue since Ive tried using msgbox which does not disable the m key. How can I make this code to work? (SendInput and Play does not work too) It's because your loop is blocking any other execution. Unless that loop is the only thing in your script, you generally want to avoid using loops and use timers instead.

How do I insert formatted text using AutoHotkey?

半城伤御伤魂 提交于 2019-12-08 16:53:39
问题 I created a script that inserts today's date in any Windows application. I would like to control the format such as font and/or color when I paste it into the target application. I can't seem to find it in the documentation or in any of the help forums. 回答1: Formatted text can be stored in the clipboard using AutoHotkey 1.1 (a.k.a. AutoHotkey_L) and a script called WinClip: #Include WinClipAPI.ahk #Include WinClip.ahk ; Format the current time. FormatTime time ; Clear previous clipboard

Autohotkey, remap Left Alt + Space to Control + Escape

╄→гoц情女王★ 提交于 2019-12-08 08:21:21
问题 I'm trying to use Autohotkey to make the Windows start menu appear by pressing Left Alt + Space instead of Control + Escape on a keyboard that doesn't have any Windows key. I'm not sure how you do that. This is what I have tried: !Space::LWin !Space::SendInput {LWin} !Space::Send {Ctrl}{click} !Space::Send {Ctrl}{Escape} !Space::SendInput, {^Escape} !Space::ControlClick, x0 y1200 !Space::MouseClick, left, 0, 1200 !Space::Click, 0, %A_ScreenHeight% !Space::send {sc05b} !Space::send {vk5Bsc15B}

hotkeys does not work when send is in loop

半腔热情 提交于 2019-12-08 07:24:45
问题 Assume this code: Loop { if enabled Send, / } m:: enabled := !enabled Return I want to toggle sending / to a Notepad for example. But if I run this code by pressing M on keyboard, then pressing the M key again does not disable sending. Looks like the send command in the Loop cause this issue since Ive tried using msgbox which does not disable the m key. How can I make this code to work? (SendInput and Play does not work too) 回答1: It's because your loop is blocking any other execution. Unless