Live data from Hacker News

AutoHotKey V2 (Breaking Upgrade)

autohotkey.com

91–100 of 124 posts

Re: AutoHotKey V2 (Breaking Upgrade)

#91
post #12

The bit about the anti-malware is sad. Does anyone remember a true positive from their AV? I can recall countless incidents caused by false positives, but can’t remember a single true positive. The latest was Crowdstrike Falcon (AI POWERED!!1) flagging signtool.exe as malware. The one from the Windows SDK. By Microsoft. Signed with Microsoft keys.

> Does anyone remember a true positive from their AV?

Yes. I don't remember the details but there was one time where it prevented me from executing some download that was malicious. This was more than a decade ago.

On another occasion (around the same time) it failed to prevent malware from executing. I never found out what the method of infection was, but after changing back the wallpaper and removing it from startup programs, I suffered no further ill effects... fifteen year old me was not very thorough but seems to have worked anyway.

And then there are the numerous annoyance occasions where it false-positived on legitimate software like Nirsoft, Cain&Abel, Netcat, Nmap, etc. Not to mention corporate proxies blocking my personal link shortener but being fine with bitly. Security theatre, those are.

To be fair, AV also prevents executing standard metasploit things and attackers have to be a bit more creative which gets tedious and so it can be an indicator of compromise to have this pop an alert even if the attacker succeeds a few minutes later.

Re: AutoHotKey V2 (Breaking Upgrade)

#92

I'm surprised no one has mentioned this; AHK broke compatibility with this upgrade. I tried upgrading autohotkey and it braked my scripts. It seems to have an auto-regress feature, which is nice. If someone knows where there is a comprehensive this-for-that upgrade guide, that would be nice; I didn't see such a thing on the site.

That's in the title. Was the title changed?

Re: AutoHotKey V2 (Breaking Upgrade)

#94
post #49

Earlier quoted context omitted.

For me it was the CMD+` for cycling between windows of the same Application, can't live without it. Do mean "hide a window" just the CMD+H in macOS? How did you do it?

Do you have an example on how to do CMD (CTRL) + ` on Windows?

Sure, I used this snippet https://gist.github.com/snmishra/794c5f41693510c46ba9bedc839...

Re: AutoHotKey V2 (Breaking Upgrade)

#95

Somewhat timely. AHK is one of those utilities I absolutely cannot go without. I've been running it on all my Windows machines for 15 years now. Just a few days ago I was complaining¹ about how Excel handles formula input. After some back and forth on my yak-shaving attempt, I realized I could shave it myself with AHK. With this little bit of code, my [Enter] and [Tab] keys work the way I want them to in Excel. This…

My favourite script was from when I was playing Diablo 3 heavily (around 2015), but for a while I had been pressing my mouse hand too hard into my mouse pad which were causing some RSI issues.

I found a +-300 line script which allowed me to play with a controller (made by zarzare), I modified it for the different classes and it worked ridiculously well. It used basic trig to create a circle around the player's position and cast abilities in that direction. You could specify a short/long range so abilities could be cast either short or far, depending on the range of the ability.

Re: AutoHotKey V2 (Breaking Upgrade)

#96
post #66

As everyone says AHK is phenomenal but the scripting language is pretty warty. I wonder if they considered using Lua or something instead of improving their custom language?

I think the language is more of a feature than a detriment: much like Excel, it’s able to get non-programmers to do programming without realizing it. Both tools have a low barrier to entry and a relatively gradual learning curve. All you have to do set up an AHK script is open up notepad, type a hotkey symbol, then some basic commands like “Click , ” or “Send ”, save the file, and double click to run. Doesn’t get muc…

I think this has more to do with scripting nature of the language than its syntax itself - at least I always found the best/easiest environments to use in practice to be the ones that:

1) executed in a clear, top-down fashion, allowing to write code top-level, without wrapping it in functions and calling from an explicit entry point like main();

2) interfaced directly with the useful APIs, vs. having to manage libraries and namespaces;

3) interpreted directly from the source file, as opposed to having first run a compiler or other explicit, artifact-producing step;

Basically, languages that would let me just write minimum amount of code to solve, through trial and error and experimentation, my simple problems.

I believe this is where some Lisp language would shine, if not for the fact that you have to press SHIFT to enter parentheses... I suspect this is a large reason people ended up preferring scripting languages with punctuation that can mostly be entered without modifier keys.

Re: AutoHotKey V2 (Breaking Upgrade)

#98
post #8

I struggle to get things done on any PC until I install my personal AHK script which remaps certain keyboard and mouse functions in ways which dramatically accelerate my productivity.

Same! A couple of my super-short must-haves are:

  ; Map CapsLock key to Control
  CapsLock::Ctrl

  ; Ctrl + Alt + Arrow key jumps to beginning/end of line/document; 
  ; Add Shift to select as well
  ^!Left::SendInput, {Home} 
  ^!Up::SendInput, ^{Home} 
  ^!+Left::SendInput, +{Home} 
  ^!+Up::SendInput, ^+{Home} 
  ^!Right::SendInput, {End} 
  ^!Down::SendInput, ^{End} 
  ^!+Down::SendInput, ^+{End} 
  ^!+Right::SendInput, +{End}
On any PC without these running I feel hobbled. It's like my shoelaces are tied together or something.

Re: AutoHotKey V2 (Breaking Upgrade)

#99

Earlier quoted context omitted.

...holy crap. You just blew my mind. I have HUNDREDS of little AHK hotkeys. I use some of them dozens of times a day. I've been wanting some way to directly target Excel like this for literal years. Thank you!!!

:) I’m kinda both proud and ashamed. I’ve also hated the ergonomics of the formula bar for years, but never tried to do anything about it. I’ll bet I find more weird corner cases with this hot key. My first attempt didn’t handle the autocomplete, and that was a big letdown until I found the workaround. I’m sure I’ll run into something else as well.

In return, as a token of my gratitude, I give you a script that allows horizontal scrolling in Excel with Shift + Mousewheel (bafflingly not a default in Excel, even though that's becoming standard almost everywhere else):

  ; Excel horizontal scroll with Shift + Mousewheel 
  #IfWinActive, ahk_exe EXCEL.EXE 
    +WheelUp:: 
      SetScrollLockState, On 
      SendInput {Left} 
      SetScrollLockState, Off 
    Return 
    +WheelDown:: 
      SetScrollLockState, On 
      SendInput {Right} 
      SetScrollLockState, Off 
    Return 
  #if

Re: AutoHotKey V2 (Breaking Upgrade)

#100
post #73

Earlier quoted context omitted.

Well, what? My objection is calling a closure for “nested function”, a term I’ve never seen for such a thing.

It's a very natural and obvious term (far more natural than "closure" IMO). The wikipedia page has citations going back at least 20 years.

You win.
Post reply on HN