• Intro to AutoHotkey HotStrings with AutoHotkey Intermediate AutoHotkey GUIs are Easy with AutoHotkey Intro to DOS & AutoHotkey

Get text from a list box; use AutoHotKey to grab items from programs

Get text from a list boxSometimes I’d like to be able to, progromatically, extract values listed inside a program. AutoHotkey Bottle 2 Unfortunately many programs I use do not allow the ability to get text from a list box.

One of AHKs great strengths is how well it “hooks” into Windows.  I wrote an AutoHotKey script which allows me to copy and paste a list of items selected in the window.  There are lots of options like retrieve all items, only those selected, obtain the count of either previously mentioned.  Once you have all the items you can send instructions back to the list box and specify which one you want selected (thus if you frequently go back and select the same items, it can automate the process.

loop {
  ControlGet, Sel_CT, List, Count Selected, SysListView321, A ;Gets count of items selected from last active window
  ToolTip % Sel_CT
sleep, 300

#IfWinActive ahk_class #32770 ;Only run below if in Specific window type
ControlGet, Selected_Items,List,Selected      ,SysListView321, A ;gets Selected Items in last active window
ControlGet, Selected_CT   ,List,Selected Count,SysListView321, A ;gets count of selected items in last active window

ControlGet, All_Items,List,      ,SysListView321, A ;gets list of all items in last active window
ControlGet, All_CT   ,List, Count,SysListView321, A ;gets count of all items in last active window

MsgBox % "Number of Items selected: " Selected_CT "`r`r" Selected_Items
MsgBox % "Number of Items selected: " All_CT "`r`r" All_Items

Black Bottle 2

Get text from a list box

Transfer systems automatically regardless of their sources

transfer systems

TBlack Bottle2ransfer Systems regardless of their sources

Our clients enter campaigns into a SharePoint page that need to be transferred to our CMS. Unfortunately the two systems are not tied in any way and there are no existing API Web Services that we can leverage.

There are over 250 items that might be selected which means we end up taking a lot of time to, manually, transfer the campaigns.

I wrote a script with AutoHotKey that automates much of the process (as well as replacing Unicode values with their HTML equivalents).  This allows me to transfer systems automatically with very little effort!

This saves a TON of mundane time by performing web scraping with AutoHotkey and is more reliable than doing it manually.

AutoHotkey Bottle 1

Automate sales emails with AutoHotKey and Excel


Automate Sales emailsAutomate sales emails

I know a lot of very hard-working, but non-technical, sales people.  They spend a lot of time writing personalized emails to clients and spend even more time trying to track the responses.

There some decent mail merge tools on the market however they can be somewhat technical to use (and easy to mess up). I built a short script in AutoHotKey which allows for automating of emails but allows fore proofing & tweaking before deployment.

Paste plain text- Use 7 lines of AutoHotKey to easily strip complex RTF/HTML formatting

Paste plain text

I (AutoHotkey Bottle 1like everyone else in the world) frequently copy-paste between various programs. While some programs like Word and Excel allow for paste plain text, a lot do not.

Paste plain text

I wrote a small script in AutoHotKey which takes the contents of the clipboard and strips it of HTML/RTF format. This way it allows me to paste as plain text in any program by hitting a key combination (Control+G).  What’s great is that I don’t actually lose the original format so, if I decide I actually wanted the original content, I can still just paste with Control+V and I’m good to go!

Below is the actual code to paste plain text in AutoHotKey.

paste plain text

  • Intro to AutoHotkey HotStrings with AutoHotkey Intermediate AutoHotkey GUIs are Easy with AutoHotkey Intro to DOS & AutoHotkey