[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/ahkg/ - AutoHotKey General

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 24
Thread images: 6

File: ahkg.png (3KB, 273x163px) Image search: [Google]
ahkg.png
3KB, 273x163px
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.
https://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
>>
Fyi:
windows is botnet and linux can do keyboard automation sooo much beter
>>
Bump because I'm interested
>>
>>62160413
Care to share? I use Debian at work and the first thing that comes up for keyboard automation is some port of ahk.
>>
>>62160396
OP share your scripts, installed this bug never bothered to make my own shortcuts.
>>
File: wink.png (20KB, 166x163px) Image search: [Google]
wink.png
20KB, 166x163px
#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
>>
>>62161738
:*:_100::
:*:_b::
:*:_thinking::
:*:_smirk::
:*:_unamused::
:*:_joy::
:*:_tired::
>>
File: nani.jpg (13KB, 270x259px) Image search: [Google]
nani.jpg
13KB, 270x259px
>>62161749
wtf it won't post muh emojis
>>
File: yum.jpg (5KB, 282x147px) Image search: [Google]
yum.jpg
5KB, 282x147px
bumpity boop
>>
File: gay silence.jpg (14KB, 480x480px) Image search: [Google]
gay silence.jpg
14KB, 480x480px
finally a thread on /g/ 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
>>
>>62164947
https://autohotkey.com/docs/commands/WinGetPos.htm
https://autohotkey.com/docs/commands/WinMove.htm
>>
>>62165044
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.
>>
>>62165084
>clunky
or just use different hotkeys
>>
AHK + Terminal keyboard > Any gaming keyboard with keybinds
>>
>>62165150
>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.
>>
>>62165164
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.
>>
>>62165184
I believe you can change the API that AHK uses which fixes these issues if you run into them.
>>
>>62165169
yeah, but that's the only way if you don't want work with conditional actions
>>
>>62164893
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
>>
File: 1503395142454.png (69KB, 600x601px) Image search: [Google]
1503395142454.png
69KB, 600x601px
>>62165351
Thanks anon, using this:
SC29::
SendRaw ~
return

It just werks now.
>>
>>62165851
Mind sharing the script? I would love to have tiling in Windows controlled soley by the keyboard.
Thread posts: 24
Thread images: 6


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.