What do YOU use AHK for?

Get help with using AutoHotkey and its commands and hotkeys
omar
Posts: 391
Joined: 22 Oct 2015, 17:56

What do YOU use AHK for?

30 Jan 2018, 11:36

Me... lots of shortcuts and code snippets used a zillion times a day.
(I have about 1000 keyboard shortcuts for text expansions!)
I want to move to Mac - but I cant ONLY because of AHK - I've tried using the alternatives they have... but nothing comes close.
One day I'll try Python and try to automate Mac - but that defeats the purpose - I need to become a Python guru coder - with AHK, the framework is there and I can just use without knowing the internals.

Just wondering: what do YOU use it for?
:)
mustang
Posts: 10
Joined: 25 Apr 2017, 03:12

Re: What do YOU use AHK for?

30 Jan 2018, 12:14

Parsing HTML data from many site and send Telegram msg if find news.
Monitoring new tech support request in 14 windows (old software in my work) (used ImageSearch, click on Button and send mail if finded)
small scripts for grab text, modify and print new

sorry for my bad english
User avatar
derz00
Posts: 497
Joined: 02 Feb 2016, 17:54
GitHub: derz00
Location: Middle of the round cube

Re: What do YOU use AHK for?

30 Jan 2018, 12:26

I remap keys for specific programs
Automate annoyingly cumbersome external GUI's
Creating GUI based productivity scripts and custom tools.
try it and see
...
User avatar
Cerberus
Posts: 131
Joined: 12 Jan 2016, 15:46

Re: What do YOU use AHK for?

30 Jan 2018, 17:02

mustang wrote:Parsing HTML data from many site and send Telegram msg if find news.
...
Hey, I'm curious: how do you use Autohotkey to send a Telegram message to a specific recipient? That would be a cool way of communicating with my phone!

Oh, and is it easy to get the content of a new message in Windows?
gregster
Posts: 2813
Joined: 30 Sep 2013, 06:48

Re: What do YOU use AHK for?

30 Jan 2018, 17:45

Hey, I'm curious: how do you use Autohotkey to send a Telegram message to a specific recipient? That would be a cool way of communicating with my phone!
Telegram offers a very comprehensive Bot API. But to use this, the recipient (which could be yourself, too) has to start a chat with your bot (although group bots are also possible). Then the telegram user can send messages to the bot and receive messages from the bot.
You cannot send messages via the bot to recipients that don't know about the bot, but you could send links to your bot to other telegram users with your personal account to invite them - well you could also automate the desktop app, but that is a bit messy afaik and you cannot use the API for automation in the background of your system to do that.

For starters, you can take a look here: https://autohotkey.com/boards/viewtopic ... am#p166911 or here: https://autohotkey.com/boards/viewtopic ... t=telegram, where I show some basics. If I get to finish it some day, I will post a wrapper for the Telegram API.
User avatar
Exaskryz
Posts: 2876
Joined: 17 Oct 2015, 20:28

Re: What do YOU use AHK for?

30 Jan 2018, 22:58

AHK is the primary reason I cannot go to Linux.

While Linux, to my knowledge, has automation tools, they're not as convenient to set up as AHK.

I have done a number of things with AHK over the years:

* Process Excel Data
* Process CSV Data
* Process Web Scraped (HTML) Data
* Text Replacement
* Repetitive tasks; sometimes one-off, sometimes regular
** Sometimes it's keyboard navigation, sometimes it is clicking
* Many forum posts that I offer assistance with by using a Test Script to double check behavior
* Forum clipboard processor to add in hyperlinks to the documentation
* Sidebar I can access by clicking the side of my screen to launch programs, use little random functions, play music
* Short-term reminder system; long-term calendar event scheduler
* Window manipulation - transparency, position, always-on-top (my favorite)
* Playlist navigation
* Finer brightness control on my laptop to exceed the minimum brightness with a black-transparent overlay
* +6:: hotkey to click the ^ button on Windows Calculator
* Twitch browser profile launcher along with GUI to click on an Emote icon and type its corresponding phrase in chat
* Hotkeys for manipulating URLs so I can watch video content that otherwise fails to play when embedded (these sites only work on Chrome, not my other browsers per testing; the sites seem to mandate Flash, but the video is not dependent on them)
* Full-screen size crosshair to get that pixel perfect snip from Snipping Tool
* Hotkeys and hotstrings to launch programs; ::runnotepad:: when I need a new instance of notepad; #c:: to launch the Calculator
* Definition Lookup using Internet Explorer and COM for a background query; probably could be changed to URLDownloadToFile and parsing from dictionary.com
* gρεεκ λεττερσ
* Volume manipulation depending on where I am located (using the SSID of the network I'm connected to; used to mute my laptop when in class)

And so many more that it has basically become second nature as I've used them for years that I don't even think that I used to have them, especially the stuff working in the background.

AHK is just that amazing. And I love how I can quickly program something repetitive if something comes up. What could've taken me 10 days to do manually, I set up to run automatically and got done in 5 hours. What could've taken me 5 minutes, I set up to run automatically with 3 minutes of coding and the automation completed it in 1 minute. Whether it's a big savings or a small savings, it all adds up.
mustang
Posts: 10
Joined: 25 Apr 2017, 03:12

Re: What do YOU use AHK for?

31 Jan 2018, 03:51

Cerberus wrote: Hey, I'm curious: how do you use Autohotkey to send a Telegram message to a specific recipient? That would be a cool way of communicating with my phone!
Oh, and is it easy to get the content of a new message in Windows?

i use this function.
https://autohotkey.com/boards/viewtopic.php?t=24919

bot send message to my private channel. you need know parameters from telegram
TelegramBotToken =
TelegramBotChatID =

function is without feedback, only sending
User avatar
Xeo786
Posts: 193
Joined: 09 Nov 2015, 02:43
Location: Karachi, Pakistan

Re: What do YOU use AHK for?

01 Feb 2018, 09:03

I do lotz of things but one script amaze me ... which I wrote to correct calculation of a coloumn in a PDF file just to set every cell value according to grand total ... yaaah first script save the pdf as xls using COM then read it (converting xls back into pdf would damage its actual view so ) after reading script decompress the pdf into txt using pdftk then it replaces specific values, then again using pdftk it compress txt into pdf :-P now pdf is ready but for validation it again save as pdf into xls then compare data and confirm no other txt changes except specific column :P .
"When there is no gravity, there is absolute vacuum" -Game changer theory
BoBo
Posts: 2519
Joined: 13 May 2014, 17:15

Re: What do YOU use AHK for?

01 Feb 2018, 11:01

gregster wrote:... but you could send links to your bot to other telegram users with your personal account to invite them - well you could also automate the desktop app, but that is a bit messy afaik and you cannot use the API for automation in the background of your system to do that.

For starters, you can take a look here: https://autohotkey.com/boards/viewtopic ... am#p166911 or here: https://autohotkey.com/boards/viewtopic ... t=telegram, where I show some basics. If I get to finish it some day, I will post a wrapper for the Telegram API.
That sounds quite interesting (eg to be connected to a trouble ticket system) can't wait to see the final result/script(s) :thumbup:
MaxAstro
Posts: 552
Joined: 05 Oct 2016, 13:00

Re: What do YOU use AHK for?

01 Feb 2018, 11:56

I use AHK for... basically my whole job. XD Almost literally every single thing that was in my original job description, I have since automated in some way with AHK. If not for it, my job would still consists of weeks of mindless data entry.
Albireo
Posts: 832
Joined: 16 Oct 2013, 13:53

Re: What do YOU use AHK for?

01 Feb 2018, 12:26

- Simplify manual keyboard sequences.
- Try to automate other programs
- Instead of entering and manually filling fields - write a script with AHK.
- Create structured PDF files with LibHaru directly from text files.
- Create structured spreadsheets for primarily LibreOffice.
I was worried that AHK would stop developing, but now it seems that the language goes against a new future.
It is primarily older programs that have been automated - from import to export.
I've had difficulty in controlling newer programs - written in Java.
garry
Posts: 1869
Joined: 22 Dec 2013, 12:50

Re: What do YOU use AHK for?

01 Feb 2018, 14:05

( this in OFFTOPIC ? )
Basic idea always used: a GUI with Edit, input known variables and get result, math and string manipulation
For SIEMENS EWSD Digital Telephone Switching Network, work was done in minutes rather than hours
BoBo
Posts: 2519
Joined: 13 May 2014, 17:15

Re: What do YOU use AHK for?

01 Feb 2018, 15:26

garry wrote:( this in OFFTOPIC ? )
Basic idea always used: a GUI with Edit, input known variables and get result, math and string manipulation
For SIEMENS EWSD Digital Telephone Switching Network, work was done in minutes rather than hours
If you think this thread is distracting, I'll move it to "OffTopic" on your request?! 8-)
garry
Posts: 1869
Joined: 22 Dec 2013, 12:50

Re: What do YOU use AHK for?

01 Feb 2018, 15:38

no problem ... just thinking we had this once in 'OFFTOPIC'
https://autohotkey.com/board/topic/7222 ... otkey-for/
User avatar
Jovannb
Posts: 220
Joined: 17 Jun 2014, 02:44
Location: Austria

Re: What do YOU use AHK for?

01 Feb 2018, 16:37

my last use is for full automated creation of Autocad. Drawings out of Excel-tables with drawing parameters.
AHK-Release 1.1.30.03 Ansi 32-bit, Win10 (1903 18362.295) 64-bit, german
User avatar
Jovannb
Posts: 220
Joined: 17 Jun 2014, 02:44
Location: Austria

Re: What do YOU use AHK for?

01 Feb 2018, 16:45

ev

- compressing thousands of JPG,s (via irfanview) or PDF,s (via ghostscript)
- sending to & receiving data from our external time-recording systen by using soap/wsdl (via curl) and putting them into excel-sheets
- organizing our daily server backup

to mention a few out of app. 20 to 30 things we do with that amazing tool
AHK-Release 1.1.30.03 Ansi 32-bit, Win10 (1903 18362.295) 64-bit, german
User avatar
Cerberus
Posts: 131
Joined: 12 Jan 2016, 15:46

Re: What do YOU use AHK for?

03 Feb 2018, 23:44

gregster wrote: Telegram offers a very comprehensive Bot API. But to use this, the recipient (which could be yourself, too) has to start a chat with your bot (although group bots are also possible). Then the telegram user can send messages to the bot and receive messages from the bot.
You cannot send messages via the bot to recipients that don't know about the bot, but you could send links to your bot to other telegram users with your personal account to invite them - well you could also automate the desktop app, but that is a bit messy afaik and you cannot use the API for automation in the background of your system to do that.

For starters, you can take a look here: https://autohotkey.com/boards/viewtopic ... am#p166911 or here: https://autohotkey.com/boards/viewtopic ... t=telegram, where I show some basics. If I get to finish it some day, I will post a wrapper for the Telegram API.
Thanks for the links and for the summary. With the info from there, I have managed to send a message from Autohotkey to Telegram on my phone, which is nice. Now the other way around; I believe you cannot send a push message to Autohotkey, so you need to set a timer and poll ever x seconds? I'll look into that sometime eventually.
Last edited by Cerberus on 03 Feb 2018, 23:56, edited 1 time in total.
User avatar
Cerberus
Posts: 131
Joined: 12 Jan 2016, 15:46

Re: What do YOU use AHK for?

03 Feb 2018, 23:51

mustang wrote: i use this function.
https://autohotkey.com/boards/viewtopic.php?t=24919

bot send message to my private channel. you need know parameters from telegram
TelegramBotToken =
TelegramBotChatID =

function is without feedback, only sending
Thanks for the link! I have indeed got that working now. Too bad it doesn't seem possible for Autohotkey to receive a push message, as you say. Except through repeated polling.
gregster
Posts: 2813
Joined: 30 Sep 2013, 06:48

Re: What do YOU use AHK for?

04 Feb 2018, 02:47

Cerberus wrote:I believe you cannot send a push message to Autohotkey, so you need to set a timer and poll ever x seconds? I'll look into that sometime eventually.
Yes, that is the way to go. It hasn't do to with AHK - it is just how these APIs work in general. But it is not a problem - you just call the Updates API function every 500 or 1000 milliseconds, or whatever is good for you (here: https://autohotkey.com/boards/viewtopic ... am#p192355 I do it every second - but the polling time could be shorter). It is meant like this and it is working well, at least for private applications. It seems to be very light on the CPU - I am doing lots on other stuff on my old computer without even noticing the polling.
Like Telegram says:
You use getUpdates at the moment and it works, keep it that way. Especially if you're running your bot from a nice machine that does well. There is nothing wrong with using getUpdates
(https://core.telegram.org/bots/webhooks) The alternative, the push version of things, would be to use the Webhook method with a webserver. But then things get more complicated (at least, for me) and you will rather need PHP or something related and don't have to have your computer the whole time running you want to use the bot. But atm it seems unnecessary for me, as I am doing just a little webscraping/calling other APIs while I am sending the gathered information to my own phone and to a few friends. I am also using this method to play music from my computer, when I am at home... By polling the messages, I can change the settings of my script, for example, stop the webscraping or play or stop a certain playlist on my computer. For that, it is very comfy to create custom keyboards with your own buttons that will be displayed in the messenger. The parsing of the messages is actually the part you will have to think more about than the polling itself.( the post I mentioned above shows how to create a simple keyboard and a simple way of parsing)
Last edited by gregster on 04 Feb 2018, 03:02, edited 1 time in total.
gregster
Posts: 2813
Joined: 30 Sep 2013, 06:48

Re: What do YOU use AHK for?

04 Feb 2018, 02:58

BoBo wrote:
gregster wrote:... but you could send links to your bot to other telegram users with your personal account to invite them - well you could also automate the desktop app, but that is a bit messy afaik and you cannot use the API for automation in the background of your system to do that.

For starters, you can take a look here: https://autohotkey.com/boards/viewtopic ... am#p166911 or here: https://autohotkey.com/boards/viewtopic ... t=telegram, where I show some basics. If I get to finish it some day, I will post a wrapper for the Telegram API.
That sounds quite interesting (eg to be connected to a trouble ticket system) can't wait to see the final result/script(s) :thumbup:
Yeah, there are many possibilities to use this. Of course, for a 24/7 service it would probably be more convenient to use Telegram's webhook with a dedicated webserver, using php or similar. But that would probably be something for another forum.

Return to “Ask For Help”

Who is online

Users browsing this forum: alexdelara, Bing [Bot], Getfree, Godvicien, Google [Bot], gwarble, Helgef, roysubs, teadrinker, TryingToLearnThings and 193 guests