Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
AutoHotkey (autohotkey.com)
2 points by matthberg on July 10, 2024 | hide | past | favorite | 10 comments


What's new with AHK?


I'm a big AHK fan but this reeks of a bot post. Not that it matters anymore, can 't fight the tide.

TL:DR; I'm maybe not the last human on HN, but the end of the line is in sight.


Looking at the history of the OP, s/he doen't look like a bot. I may be wrong, but I don't see anything unusual. You may contact dang hn@ycobinator.com but in this case I don't think it's necesary IMHO.

As a sugestion to the OP, I'd recomend to add the catchphrase when the title is too short. For exaple in https://news.ycombinator.com/item?id=40806475 instead of "Patterns.dev" I sugest to use "Patterns.dev: Improve how you architect webapps". Sometimes it's reverted to the original title, but most of the times the catchphrase or the first sentense is fine.


I want to call that original post a glaring non-sequitur but that's not quite the right word. He's posting a TLD that's been around for ages without comment. If he posted microsoft dot com, a human would go, well, what about it?

For example, what I just wrote sounds like I didn't even understand what you said about patterns dot dev. I did that on purpose. They OTOH don't have comprehension---yet. That's just one exapple of how you spot a human.

Not that it matters, they can multiply so much faster than us we'll all soon be outnumbered a million to one.


I looked at wikipedia and AutoHotKey started in 2003, but I learned about it in 2020 [1] and perhap I'd posted here in 2020. So I'm not convinced, but I may be wrong. (It would be nice if the OP replies, but some people prefer to avoid discussions.)

[1] One of my firend recomended it so I could simulate "canned replies" when I was using the webserver of my university. 2020 was a strange year and I had to reply a loooooooot of emails.


That sounds like a cool idea. Could you give me an exapple?


I don't have that notebook now, so I have to make up a script from my head.

I opened the webmail and logged in as usual. I read the message and I had to reply with info from another site. So I copy the info to the clipboard and go to the webmail a and I press Ctrl-[Something]. (Where [Someting] is a key that I choose carefully to avoid colissions, but I don't remember now.)

So Ctrl-[Something] triggers AHK. Something like

* Search for the buttotn that says "Reply" and press it.

* Wait a second so the new page loads.

* Search for the text "Message"

* {Tab} to advance to the text field

* Write the text: "Hello! Thanks for writing. The info you need is: "

* {Paste clipboard}

* {enter}

* Write the text: "If you need more info, please write us again."

IIRC it didn't press the "send" button automatically, because from time to time I had to customize the reply. (Also to check that the cipboard text made sense.)

I remember something about skiping a few buttons like {Tab}{Tab}{Tab}{Tab}{Tab}, but I don't remember why I needed that. Perhaps to press the "send" button???. Perhaps the text box has no label and I had to search an unrelated word and skip a few UI items???

I think I had two or three similar AHK scripts with different hot keys for different types or email. The most complex used the clipboard but other just wrote some text.

I had to reply like 20 or 30 similar email per day on an old webmail page, so this was a life saving tool. I thanked my friend extensively.

My description of the script may have errors, so if something makes no sense please ask for clarifications.


Search for the button - yeah, I started out like that, AHK Imagesearch, it works really well once you get the hang of it, capture a little thumbnail, bmp is a good format because it doesn't shift any hues, then it can read that .bmp and it will search for the portion of the screen that matches it, but it works better if you limit the search area with an x1,y1 to x2,y2 rectangle. I had one that I called drax.ahk (this was around the time of the GotG movie so I named it after Drax) and it would click reply then insert quotes from the movie like "Nothing goes over my head! My reflexes are too fast, I would catch it."

Good times. But window handles (HWND) are easier and more reliable.


I think I just searched for the text inside the button, it was not necesary to interpret the image. ANyway, it's a very powerful tool.


This reminds me of the kid in high school who pretends to have a girlfriend that lives in another city and that's why no one has ever seen an exapple of her.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: