A list of puns related to "AutoHotkey"
Made a video while back on AutoHotkey which I use to automate a ton of my job. Shh dont tell my boss lol!
AutoHotkey is great lang. for automating pretty much anything from work to gaming.
I mostly use it to automate outlook and chrome for our company site with inputting data way faste. hope it can help you also.
https://www.youtube.com/watch?v=Au5BFtpb65o&t=1s
EDIT: and incase someone wants a macro creator vs doing them selfs
Hello,
I'm currently working on something that has me copy-paste a lot of text from several websites/pdfs/word documents etc into a powerpoint document. This involves the following sequence: highlight text, ctrl+c, move mouse over to powerpoint, right click, "paste as text only", move mouse back to original document.
I purchased a logitech g300s, and set up one of its keys to execute the above macro EXCEPT the mouse movements. So now I highlight the text, move the mouse over to powerpoint, click the mouse macro key, and move the mouse back. This has helped a lot, but I'm wondering if authotkey can go one step further and automate the mouse movement as well.
If so, how do I go about learning how to program all of this? I have zero programming knowledge.
Thank you!
Hey guys, I want to share my solution for playing AutoHotKey Music scripts on linux from http://gw2mb.com/:
Use the linux alternative AutoKey (https://github.com/autokey/autokey).
If you want to have the ability to stop playing a song (stopping a script) you should create a stop script with following content:
store.set_global_value("PLAY_MUSIC", False)
https://preview.redd.it/xaw3ubmxhiz61.png?width=778&format=png&auto=webp&s=3bd43095ea61d0f4ee764919fa69d24ffac959da
Assign a hotkey to it! ;)
Now create a template script with following content:
import re
import time
store.set_global_value("PLAY_MUSIC", True)
commands = """"""
for command in commands.split("\n"):
if store.GLOBALS.get("PLAY_MUSIC", False):
if command.startswith("SendInput"):
key = re.search("Numpad", command)
if key:
map = ["<np_page_up>", "<np_end>", "<np_down>", "<np_page_down>", "<np_left>", "<np_5>", "<np_right>", "<np_home>", "<np_up>", "<np_insert>"]
down = re.search("down", command)
up = re.search("up", command)
if down:
#keyboard.press_key(map[int(command[key.end()])])
keyboard.send_key(map[int(command[key.end()])])
elif up:
print(1)
#keyboard.release_key(map[int(command[key.end()])])
else:
keyboard.send_key(map[int(command[key.end()])])
else:
time.sleep(int(command.split(" ")[1]) / 1000)
So when you want to add a song, right click the template script in the list and clone it, rename it and paste the content of a desired .ahk script from http://gw2mb.com/archive.php like following between the six double quotes:
"""HERE COMES THE SCRIPT"""
Here is an example:
Than you should assign your numpad keys to the abilities in gw2 like this:
[english](https://preview.redd
... keep reading on reddit โก#Persistent
return
OnClipboardChange:
ToolTip Clipboard data type: %A_EventInfo%
StringReplace, Clipboard, Clipboard, `r`n,%A_Space%, All
Sleep 1000
ToolTip ; Turn off the tip.
return
at times when i copy paste, line breaks are removed, at times it wont work. can someone please help
thank you
So I'm fairly new to AHK, but I noticed when using multiple scripts that I made into executables with it, that my System Tray gets cluttered with icons (https://i.imgur.com/56BwYZ2.png) and there's multiple processes in Task Manager due to the multiple scripts.
Is this normal? I thought AHK was meant to be "lean and mean", but this surprises me. Can it not use one single executable (and thus one icon in the System Tray) to run all my scripts?
if yes, can i have the source or link, if no what s the alternative cause i see a lot of players move very quickly and thanks
So I've got an otg physical keyboard and its slim, only has half the keys. I was wondering if it was simply possible to program functions on key presses, like "space+t = p".
I would like to be able to toggle Leaning with q and e but can't figure out if that's possible in-game. I want to create an AutoHotKey script so I can actually use that feature, but I'm not sure whether the Anti-Cheat freaks out or not, and don't want to find out the hard way either.
Cheers
Here the script I am using for Autohotkey... simply download and install, copy this script into a text file, and save as ???.ahk... double click on it to load and your done!
#SingleInstance
/*
t == press and hold e (manual Mining)
g == rapid fire press e (auto gather leaves)
b == press and hold Left Mouse Button (auto craft bench press)
v == press and hold w, (auto walk forward)
c == halts any recurring loops, incase you forget what is turned on or get confused. Simply resets everything.
~ == Pause Script
*/
paused := false
; ---------------------------------------------------------------------------------
; c halts any latent executions, in case you forget the state of your toggles!
; plays a little beep sound
; ---------------------------------------------------------------------------------
c::
settimer, dogather, off
Click, up, X2
Click, up
SoundBeep, 300, 100
Return
; ---------------------------------------------------------------------------------
; Press v to move forward with out touching anything
; ---------------------------------------------------------------------------------
v::
If GetKeyState("w")
Send {w Up}
Else
Send {w Down}
Return
; ---------------------------------------------------------------------------------
; press g to repeatedly press e, press g again to stop.
; ---------------------------------------------------------------------------------
$g::
gather := not gather
if gather
{
settimer, dogather, 40
}
else
{
settimer, dogather, off
}
Return
dogather:
Send, e
Return
; ---------------------------------------------------------------------------------
; press t to hold down e
; ---------------------------------------------------------------------------------
t::
KeyDown := !KeyDown
If KeyDown
SendInput {e down}
Else
SendInput {e up}
Return
; ---------------------------------------------------------------------------------
; Press b to hold down left mouse click
; ---------------------------------------------------------------------------------
b::
holdbutton1 := not holdbutton1
if holdbutton1
{
Click, down
}
else
{
Click, up
}
Return
... keep reading on reddit โกI'm considering to buy this mouse for productive purposes. But I can't find much information about it and Autohotkey. I worry that the buttons won't be usable with AHK. Has anyone here used it?
I already wear glasses now that my eyes are getting old, I use autohotkey on all my pc's so I can highlight that ever elusive cursor and wondering if p99 is ok with something like that or would I get whacked for using a 3rd party program?
This guys video is exactly how I have it setup: https://www.youtube.com/watch?v=kwSqtNvT7to
The script works on everything except CoH2.
#IfWinActive, Company Of Heroes 2
h::left
k::right
u::up
j::down
b::numpad0
XButton1::MButton
As a professional online poker player for more than 15 years, I've used AutoHotkey a lot:
๐ค Desktop automation (exporting datamined poker hands from a daily email to a database application)
๐ค Window and action handling (playing 22 tables required fast and automated positioning and hotkeys)
๐ค Multi-tasking
All of the above made scaling easier. And scaling meant a higher hourly income (although AHK going berserk has cost me some money here and there) ๐ธ
I did quit as a poker player mainly because the self-thinking algorithms took over that world. By that, I also stopped using AutoHotkey ๐
Until a Friday last year. I downloaded AHK, played around with it, and remembered "good old days". I decided to make a YouTube video about it. It was a Beginners Guide. The sound was terrible, and you could barely see the code ๐คทโ
I forgot about it, and then something unexpected happened...
...people started to watch it heavily. Today more than 110.000 have watched it, and it just shows that even after all these years, AutoHotkey is still prevalent ๐
Last week I made a remake with better sound and zooming on the code โก๏ธย https://youtu.be/H4GsO17Pls0
The next AutoHotkey video will be Python vs AHK, where I will show advantages with both approaches and find a "winner".
When I first started programming I learned AHK out of convenience. I've been python programming for almost two years now, but I have yet to find a good way to rewrite my AHK scripts in python. I have lots of functions that are initiated with hotkey presses via an AHK script that runs continuously in the background.
I basically just want this python script to run all the time in the background until I hit a hotkey combination and then have it run whatever script I need.
How can I do this with Python?
It's an introductory course for beginners that will get you started with this fantastic tool ๐ง๐ค
I'll be very happy, if you want to review the course afterward ๐
โก๏ธ Get it here:ย https://www.udemy.com/course/autohotkey-how-to-start-for-beginners/?referralCode=602B46AB69FA8636ADE7
About me: I do automation for a living (at the moment, UiPath, Power Automate, and WalkMe.) and have been using AutoHotkey a lot when I was a professional online poker player.
I'm relatively new to the Linux world (about 1.5 months in now) and am loving it so far. Bit of a steep learning curve but I feel I'm over the hump and starting to enjoy some of the effeciencies of using Linux. One thing I do miss from Windows is AutoHotKey (AHK). I used it to set custom keymappings and to create relatively involved programs in order to customize Windows to meet my needs. One really useful feature of AHK is to specify a hotkey/string/script to only run during a specific program. Currently I'm using Manjaro with KDE and am using sxhkd to create some global hotkeys but as far as I know, you can't use sxhkd to create application-specific hotkeys/scripts. Question is... are there some relatively easy to use tools to create application-specific hotkeys/programs in Linux? I'm aware that AutoKey is sort of the AHK Linux analog but from what I've read it's not too useful and isn't maintained anymore. Any ideas?
Yesterday my TrayTip working fine, but i'm testing my script, and once i forget set "sleep" or something like that, my script started spamming in notification. And now notification not working at all for "autohotkey". i trying create new script file and put something easy:
F1::
TrayTip,ย text, text
return
and this doesn't work. I noticed that in windows notification settings "autohotkey" gone at all
But i remember i saw "autohotkey" earlier in settings
Windows defender blocked autohotkey or something like that?
Any help and sorry for my english (=
I wanted to use this laptop for coding/game development in addition to gaming, and I completely forgot to check that I got a laptop with all the extra keys on the far right of the keyboard :P. In fact, this is the first small laptop that doesn't bind Home and End to Fn+Left and Fn+Right! Seems a bit silly to not do that. I use Home and End a lot while coding.
If you're like me and want to use these keys despite this laptop not having them, I've set up a way to do this through the free program AutoHotKey. I think this binding is more ergonomic and close to the original key placement than the other suggestions I've seen on the internet.
Alt+9 = Home
Alt+0 = End
Alt+{-} = PageUp
Alt+{=} = PageDown
Here is the step-by-step:
shell:startup
, and press Enter. When you put the hotkey script in here, that means that it will always be running automatically as soon as your computer starts. If you want to only start it manually, you can put it anywhere else and double-click on the script to start it up.right-click > New > AutoHotkey Script
)
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
#SingleInstance ; Only one of this script can exist.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; Each hotkey has individual "if" cases for normal, Shift, Ctrl, and Shift+Ctrl.
; After an hour or two of searching, I could not find a built-in way
; to automatically pass Shift and Control through while still capturing Alt.
; Press Alt+9 for Home and Alt+0 for End
*!9::
if GetKeyState("Shift")
if GetKeyState("Control")
Send, {ShiftDown}{CtrlDown}{Home}
else
Send, {ShiftDown}{Home}
else
if GetKeyState("Control")
Send, {CtrlDown}{Home}
else
Send, {Home}
return
*!0::
if GetKeyState("Shift")
if G
... keep reading on reddit โกI want to challenge myself in a game for a YouTube video. Specifically, I want to make it so that when I'm holding down the left mouse button, the game thinks that I'm not pressing anything at all; and if I'm not pressing anything, the game thinks I'm holding the left mouse button. Is this something I can set up in AutoHotkey?
The spacebar and mouse do the same thing in the game, that might be useful when trying to find a method, but I don't know. Any help would be amazing!
Hey everyone
I wondering if someone has an autohotkey script to make mouselook a toggle? I found an old one but the media file is deleted. It allowed you to press ctrl to toggle and bound mouse 1 & 2 to some abilities.
Any ideas?
Hi there,
I'm trying to see if i can use a guitar pedal (mooer GE-150)as a midi controller.It has usb connection available for updates and audio through USB, and i'm wondering if it send anything when i'm pressing the buttons. If it did i could write a script to translate whatever it sends to midi commands and i would be very content.
However I have a hard time finding a method to record the potential data transmission. I've tried the " Joystick Test Script" but the unit is not recognized as a joystick. It is, however, recognized by windows as an external device...
Any ideas ?
Thx a lot
I wanted to give back to the community, so I documented my first build with the BDN9 board from Keebio.
https://github.com/f-eq-ma/bdn9
Files available that I use for QMK and AutoHotKey to control iTunes.
Enjoy
Does anyone have an Autohotkey script for the new 2021 G14 function keys? Specifically for F1 (mute), F2 (keyboard brightness down) F3 (keyboard brightness up), F7 (display brightness down, and F8 (display brightness up)? Thanks in advance!
so i use ahk everyday and im a bit tired of typing /ah, /bz, /warp dungeon_hub (or /dh for that matter), "rabbit at mort", etc, so I got a script that basically types those commands if I press a hotkey; is that bannable?
Did not see that, so I share here. Got a G815 and was searching how to use the volume wheel as mouse wheel. As I did not see a solution, I tried to use Autohotkey to do the task. Voeila, it is working.
Here a script which is working quite fine on my machine:
SetTimer, WatchKeyboardWheel, 50
return
SC130::
MouseClick, WheelDown
return
SC12E::
MouseClick, WheelUp
return
WatchKeyboardWheel:
KeyWait, SC130, L
KeyWait, SC12E, L
return
If I want to use the Volume feature of the wheel, I can use it together with CTRL.
Enjoy.
Marcus
Up until now, I always had to use Neutron only as a one-way: from my HTML page (either through form submission or JavaScript function) to AutoHotkey/Neutron, never the other way around. But now, I need to call a JavaScript function from AutoHotkey, specifically because I want the JavaScript function to execute when I use a keyboard shortcut defined in AutoHotkey.
I looked through the examples and I found the "mouse position" example (DynamicContent in Template.ahk), which simply updates the HTML through AutoHotkey, but doesn't call any custom JavaScript functions. Looking through the Neutron file, I saw there is a way to use the "querySelector" function:
;ย Shorthandย methodย forย document.querySelector
qs(selector)
{
return this.doc.querySelector(selector)
}
But I can't really access my own JavaScript functions this way. I even tried to polyfill the document interface with my own function, but that didn't work either:
Document.prototype.testFunctionย =ย function(h)ย {
alert('Test!');
}
I feel like I have overlooked something very basic, I just don't get how I'm supposed to call a JavaScript function from within AutoHotkey/Neutron. Can anyone help?
Hey guys, I was a little disappointed that my XPS 17 didn't have a shortcut on the F9 key so I decided to set up a little AHK script that will blank the screen when the F9 key is pressed (and return it to normal when pressed again). To run this you would just need to install AHK and create a new .ahk file and tell windows to run it with AutoHotkey. Here's the code:
F9::
V++
M:=mod(V,2)
if M=1
{
Gui, Show, Maximize, x0 y0
Gui -Caption
Gui, Color, 000000
Gui +AlwaysOnTop
}
else
Gui, Destroy
return
Let me know if you have any questions and have a good day!
Hello, I'm a comp sci graduate whos had nothing to do with python since my studies.
I've been using AHK ImageSearch to recognize images on screen and do an action based on that image, however it is limited by a 100% match only, so if a pixel is a little off it cant find the image. (you just save an image of what you want it to recognize in a folder)
This is a problem as the images are sent over an analog signal, which means a single pixel color CAN vary a little bit
My program only has to recognize about 50-100 objects, but it has to happen really fast (AHK is pretty much instant but is limited as said before)
Any ideas?
Also, If I need to throw together a super simple GUI quickly - what's the "standard practice" for a quick one?
Thanks in advance
I forgot to switch off a AHK script. I used it in a clicker game, and forgot to turn it off after exiting the game. I played one casual match before realizing that i wasn't able to hold m1 to place my gadgets. Chances of getting banned? Uninstalled AHK afterwards
so one key stopped working in my keyboard, i try using AHK to redirect the key to another key i i do not use... still does not work, as if the key is not the broken thing but something in the system is blocking the key stroke, any ideas?
example:
z::p
i try placing the broken letter (p) into another key (z), and the other key (z) simple stopped working (deleting the code makes it work normally again), any ideas? closing the AHK script does not solve anything (z still not working), so, is this related to my system or that's how it normally behave AHK with a broken key? this problem started a few minutes ago.
edit: I restarted the PC normally, and it was working again, i guess it was a bug or something on any of the background process.
CapsLock::
WinGet,ย OutputVar,ย ProcessName,ย A
SplitPath,ย OutputVar,,,,ย OutNameNoExt
IfEqual,ย OutNameNoExt,ย WindowsTerminal
{
Sendย {ALTDOWN}{TAB}{ALTUP}
}
Else
{
IfWinExistย ahk_exeย WindowsTerminal.exe
winactivateย ahk_exeย WindowsTerminal.exe
else
Runย wt
WinWaitActiveย ahk_exeย WindowsTerminal.exe
}
Titlw
/u/GIZM02K took me up on the offer and really improved it into a much more optimized version, which the top version is based on.
This script moves cycles through your monitors, moving the mouse to the center of each.
On the first line is a variable to set the limit-delay for how long the Middle Button press can last and still capture. This way you can still control scroll in programs.
All my monitors are horizontally aligned along the top edge. I do know there's an issue with vertical-centering the mouse when this isn't the case.
#SingleInstance Force
; This is the only variable you might change, millisecond delay for tolerated click duration.
MButtonDelay:=350
MonDims:=[] ;monitor dimensions array
param1 = %1%
param1 := (param1 = "" ? "0" : param1+1)
SysGet MonCount,MonitorCount
Loop %MonCount%{
SysGet abs,Monitor,%A_Index%
MonDims[A_Index]:=[absLeft,absRight-absLeft,absBottom]
}
if (param1 > 5) {
; Sometimes the script fails, seems to be usually after a sleep.
; If it fails repeatedly, we'll just kill it.
MsgBox, "Something is wrong, try restarting the mouse-centering script."
ExitApp
} else if (param1 > 1) {
; If it's been reloaded after failing to find the next monitor, let the user know
ToolTip, Sometimes the mouse doesn't jump properly after sleeping. Re-initializing (%param1%).
SetTimer, RemoveToolTip, 2000
}
Return
Reloader:
; Send this to release the middle-button
Send {MButton up}
Run, "%A_ScriptDir%\%A_ScriptName%" "%param1%"
ExitApp
Return
;Handy hotkey for debugging. Can set to anything you like
;F1::GoSub Reloader
MButton::
; If StartTime already greater than 0, then we're in native state (extended click)
If (StartTime>0) {
; Release the Middle-button
Send {MButton Up}
StartTime = 0
} Else {
; Start the timer
StartTime:=A_TickCount
}
Return
MButton Up::
If (A_TickCount-StartTime>MButtonDelay) {
; If the button was held long enough, we want to trigger scroll state
Send {MButton}
} Else {
GoSub GoNextMonitor
}
Return
GoNextMonitor:
StartTime=0
cm:=Fin
... keep reading on reddit โกSo I read the article about the exploit and I start writing this, I am just posting this here because you may be interested, and I am looking for improvements, if possible. Hoping it fits in on this sub.
Anyway, here is the script: https://github.com/Krizsan0596/AutoHotKeyBSOD
Need a script where when I press Shift once, it actives Shift, Shift, Mouse5 in quick succession. Maybe like 100ms apart?
Can someone tell me if this looks good?
shift::
Send shift
sleep 100
Send shift
Sleep 100
Send XButton2
sleep 100
return
Not super sure if it's capital Shift or not or if XButton2 is actually mouse5.
Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.