/ahkg/ - AutoHotKey General

What is AutoHotKey?
>AutoHotkey is a free, open-source custom scripting language for Microsoft Windows, initially aimed at providing easy keyboard shortcuts or hotkeys, fast macro-creation and software automation that allows users of most levels of computer skill to automate repetitive tasks in any Windows application.
autohotkey.com/

Basic features:
>AutoHotkey scripts can be used to launch programs, open documents, send keystrokes and mouse clicks and movements. AutoHotkey scripts can also assign, retrieve, and manipulate variables, run loops and manipulate windows, files, and folders.

Purpose of /ahkg/
WE share and discuss scripts!
WINDOWS USERS ONLY. GANOO SLASH LOONIXFAGS NEED NOT APPLY. Don't come in here and derail this general saying how Windows is 'botnet' or how linux can do keyboard automation sooo much better

Other urls found in this thread:

autohotkey.com/docs/commands/WinGetPos.htm
autohotkey.com/docs/commands/WinMove.htm
twitter.com/SFWRedditVideos

Fyi:
windows is botnet and linux can do keyboard automation sooo much beter

Bump because I'm interested

Care to share? I use Debian at work and the first thing that comes up for keyboard automation is some port of ahk.

OP share your scripts, installed this bug never bothered to make my own shortcuts.

#SingleInstance, Force
#Persistent

Menu, Tray, Icon, Shell32, 174

:*:_100::
:*:_b::
:*:_thinking::
:*:_smirk::
:*:_unamused::
:*:_joy::
:*:_tired::

^+3::
{
MouseGetPos, MouseX, MouseY
PixelGetColor, Colour, %MouseX%, %MouseY%, RGB
StringTrimLeft, Hex, Colour, 2
Clipboard := "#" . Hex
Return
}

^+4::
{
Run, SnippingTool
WinWait, Snipping Tool
WinActivate, Snipping Tool
Send, ^n
Return
}

^+v::
{
SendInput, %Clipboard%
Return
}

^+u::
{
Run, pythonw "D:\Software\_Utilities\PyUpload\upload.py" "%Clipboard%"
Return
}


memes

:*:_100::
:*:_b::
:*:_thinking::
:*:_smirk::
:*:_unamused::
:*:_joy::
:*:_tired::

wtf it won't post muh emojis

bumpity boop

finally a thread on Sup Forums i could contribute to and i'm just here samefaggin

Really scraping the bottom of the barrel for new general ideas here.

So, uh, how do you make a script which makes a tilde appear when I press the tilde key (left of one, below esc)? Sounds retarded, yes, but the thing is every time I press that key I get nothing and when I press it again I get ¸¸ (cedilla, U+00B8). That is without holding shift, and when I do hold shift and press it once I get nothing immediately again, but once more and I get ¨¨¨ (diaeresis, U+00A8). So, yeah, a script that clears what I presume is a character buffer and outputs ~ when I press the tilde key?

Anyone know how I can script the keyboard shortcuts of a semi-decent window manager? I only know how to set one position with one shortcut. What I don't know how to script is using the same shortcut to incrementally adjust a given window. For example I'd like
>start with maximized window
>Win-Left: window shrinks to left half of screen
>Win-Left: window shrinks horizontally again by half
>Win-Up: window shrinks vertically by half toward the top left corner
>Win-Right: window expands horizontally to half the screen width again without changing vertically

autohotkey.com/docs/commands/WinGetPos.htm
autohotkey.com/docs/commands/WinMove.htm

I know those commands, but the only way that comes to mind for me to use them is a bunch of conditionals. For example Win-Left could mean "halve the width of the active window and maintain its X position" if it's already on the left, or it could mean "double the width of the active window and adjust its X position" if it's on the right. That seems clunky as fuck.

>clunky
or just use different hotkeys

AHK + Terminal keyboard > Any gaming keyboard with keybinds

>I only know how to set one position with one shortcut. What I don't know how to script is using the same shortcut to incrementally adjust a given window.

I've never run into one myself, but I hear there are games out there which freak out if you have AHK running. Gotta have the keyboard for those.

I believe you can change the API that AHK uses which fixes these issues if you run into them.

yeah, but that's the only way if you don't want work with conditional actions

Try using scancodes maybe. There's a script to find the scancode of a pressed key. Here's an example:
SC159:: ; Replace 159 with your key's value.
MsgBox, %A_ThisHotKey% was pressed.
return

Thanks user, using this:
SC29::
SendRaw ~
return
It just werks now.

Mind sharing the script? I would love to have tiling in Windows controlled soley by the keyboard.