r/AutoHotkey

Script exiting after being run once for no apparent reason?

#SingleInstance force
#SingleInstance ignore
#SingleInstance off

 é::
  CoordMode, MouseGetPos []
  MouseGetPos CurX, CurY
  Click, Right
  MouseMove 490, 220, 0
  Sleep, 100
  Click

^Numpad9::ExitApp

Is what I have and is exiting after being ran once.

Meanwhile something else I made:

#SingleInstance force
#SingleInstance ignore
#SingleInstance off

Numpad1::LButton

^Numpad9::ExitApp

Runs until I press Ctrl+Numpad9, which is what I want the first one to be doing too

reddit.com
u/Kecske_gamer — 9 days ago

auto complete help

i'm using AutoHotKey to paste ascii when i type. for example if i type "/happy" it will autocorrect to "(˶ᵔ ᵕ ᵔ˶)"

I've done this using this line:

::/happy::  (˶ᵔ ᵕ ᵔ˶) 

my problem is as follows. when i type it out and hit space it will, obviously, autocorrect as intended. however, if i hit space again, or enter, it will do the correction twice, leaving me with this: (˶ᵔ (˶ᵔ ᵕ ᵔ˶)

is there a way to limit the correction to once per shortcut

reddit.com
u/Fluid_Ad4213 — 9 days ago

[v2] ALTRun – an Alfred-style launcher for Windows, written entirely in AutoHotkey v2 (open source, <1 MB)

Hi all,

I'd like to share a project I've been working on and using every day: ALTRun, a keyboard-first launcher for Windows, written entirely in AutoHotkey v2.

Press Alt+Space, type a few letters, press Enter: launch apps, find files, do math, search the web or paste from clipboard history, all from one window.

Screenshot: https://raw.githubusercontent.com/zhugecaomao/ALTRun/main/docs/images/screenshots/search.png

Background

For years I used the classic ALTRun (Pascal / Delphi) and RunZ (AutoHotkey). Both were small and snappy, but I wanted more: Everything integration, clipboard history, snippets and a more modern UI. So I rewrote it from scratch in AHK v2. It keeps the ALTRun name as a tribute, borrows ideas from RunZ, and follows Alfred's interaction model.

Features

  • Tiny and portable: one compiled ALTRun.exe (under 1 MB download, about 2 MB unpacked). No installer, no registry, no admin rights. Settings live in a JSON file in the Data\ folder next to the exe.
  • Search: Start menu, desktop and Microsoft Store apps; files and folders via Everything or a built-in index; type a path like C:\Projects\ to browse folders, with Tab completion.
  • Smart ranking: learns which result you pick for each query, matches word initials (vsc → Visual Studio Code) and highlights the matched characters.
  • All in one: calculator (units, hex/bin, date math, optional currency), web search keywords, browser bookmarks, clipboard history (text, files and images, with pinning), snippets with ;keyword expansion, window switcher, 40+ Windows Settings pages, and system commands.
  • Keyboard first: → opens an action panel (run as admin, open location, copy path, properties…), F3 edits in place, Ctrl+1…Ctrl+9 run the Nth row, and ? shows a built-in cheat sheet.
  • Scripts folder: drop .ahk, .ps1, .bat or .py files into Scripts\ and they become commands. They can take arguments, or run in the background and show their output.
  • Dialog jump (like Listary's Quick Switch): in Open / Save dialogs, jump straight to the current Explorer or Total Commander folder.
  • Themes and languages: 20 built-in themes (or follow Windows light/dark mode) and an English, Chinese or Japanese UI.
  • Private: no telemetry. It only goes online to check for updates (plus daily exchange rates if you turn on currency conversion). Updates install from the search window and are SHA256-verified.

A few notes for AHK folks

  • You can run it from source (ALTRun.ahk) if you have AHK v2 installed; the release exe is compiled with Ahk2Exe.
  • The code is split into providers (apps, files, calculator, clipboard, snippets, windows…), each returning result items to a shared ranking and UI layer, so adding a new source is fairly contained.
  • There are 7,000+ tests, run on a Windows runner for every pull request.
  • GPL-3.0. Issues and PRs in English are welcome (the wiki is mostly in Chinese for now, but the UI and README have English).

Links

I'd love feedback, especially on what feels clunky or what you'd expect from a launcher that isn't there yet. Thanks for taking a look!

u/zhugecaomao — 11 days ago

Mouse cursor moves vertically in game (screen 1) when in screen 2 + clicks are registered.

When my mouse cursor is in screen 2, any vertical movement applies to game in screen 1. Clicks are registered too. I changed the display and used DMT to restrict cursor to one screen, but that didn't work.

It makes translation longer and reduces immersion as the game pauses with each registered click. The game in reference is Frog Detective 1 The Haunted Island.

Any advice to resolve this?

reddit.com
u/Hot-Self-4782 — 11 days ago