4 ms·
Would you interact with things like browsers/programs when using AHK? For example open a browser, open gmail, paste the highlighted text into a draft email? O
by authorfly 2y ago
Would you interact with things like browsers/programs when using AHK?
For example open a browser, open gmail, paste the highlighted text into a draft email?
Or is it other things you would script up?
- al_borland 2y agoA lot of the items were searches. Search for this ticket number in our ticketing system. Search for this server in the CMDB. These are things we end up doing all day long, sometimes hundreds of times per shift, but usually dozens. It would open the website with the search results. These ones were simple, just stick the search string in the URL. Though some were a little smarter, using some regex to tell what kind of data it was, so it could do multiple searches in the same system with one button. Other options opened applications. Highlight a hostname, hit a key, and open a window to SSH to that server. One of the more involved ones was for remote desktop. Most people on the team used a remote desktop manager vs the single window RDP. So for this it activated the app (or opened it if needed), then added the server into a group called temp, activated that connection, and logged the user in. When I first started working on it we had to keep an eye on the ticket queue, which required a manual refresh. I found this annoying, so I made a key that would switch to that browser window, click the refresh button to see the updated counts, and then switch back to whatever I was doing previously. I did some stuff with email too. We use Outlook, but my boss wanted me to make email templates for some process he came up with. He gave me an Excel sheet with all the data. There is probably a way to natively handle automating this, but I couldn't find anything easily, and it was a one time thing. I wrote something that went line by line though the Excel sheet, switched over to Outlook, made the template based on the data, saved it in the proper format and location, then went on to the next line. It took about 2 hours to run, but he was originally planning on having 4 interns work on doing it manually for a week, which would have been very error prone and led them all to quit. I did get one co-worker who added a feature that was pretty cool. In the GUI he had it slide out a calendar where the user could pick a date range and some other params to run a quick report in our ITSM software. The GUI also had a text field on it, so the user could tweak what was copied if needed. There was also an option to preserve whatever was previously on the clipboard, so using it to look something up didn't break the user's flow with other stuff they were using the clipboard for. When I shared it with the team I was able to compile it to a .exe, so I didn't need to explain the whole AHK setup and deal with issues around it. Then all the settings were saved out to an ini file that was created on first run. Since there ware a lot of shortcuts to remember (if they wanted to use more than just the GUI), I also had a keyboard shortcut that would toggle on/off a HUD with all the shortcuts they had configured, which respected their preferences. I figured that would be helpful as they got used to it. The GUI could also be used with the keyboard or mouse. Every button had a shortcut key (standard Windows style where the shortcut letter is underlined in the button title). If you decide to do something like this, I would highly recommend making a function that does KeyWait on every single key and call it first thing before doing anything else. This solved so many issues for me with keys being stuck down in software and wreaking havoc on the rest of the script.
- authorfly 2y agoI must say I do find this really interesting! Thanks for detailing your use cases. I can envision some of them, the ticket search especially. It reminds me of slack bots that auto assign links to mentioned issue numbers, etc, but is a bit more useful to just hit a key and go to it.
- al_borland 2y agoThat was kind of the idea. I didn’t have the ability to control the various tools we use, so AHK acted as the glue to make jumping between everything more fluid.