• Become a Power user Intro to AutoHotkey Intermediate AutoHotkey Intermediate Objects GUIs are Easy w/AutoHotkey Painlessly switch from V1 to V2

AutoHotkey Webinar- Using AHK string functions in Excel

AHK In this webinar we walked through using AutoHotkey String functions in Excel.

Script Highlight:  Pull data about your computer with WMI by shajul.

Video Hour 1 & 2 : AHK string functions in Excel

Books on RPA (Robotics Process Automation) that I mentioned in the webinar

Below are links to books I showed during the webinar. I put them into two groups (those I like/recommend and those I don’t). I’m more of a “glass is half-full” kind of guy and think technology is good. The books I don’t recommend were much more negative towards technology. While I don’t recommend them, I think time will tell who is right/wrong.  Personally any of the following you buy I’d try and buy as used.  Many are pretty expensive new (probably because of the small market size)

Recommended Robotics Process Automation books

Service Automation: Robots and the Future of Work 2016 -Great book!
Robotic Process Automation and Risk Mitigation: The Definitive Guide 2017
Robotic Process and Cognitive Automation: The Next Phase 2018 -Great book!
The Singularity Is Near: When Humans Transcend Biology 2019 – very interesting
Life After Google: The Fall of Big Data and the Rise of the Blockchain Economy 2018 – some wild ideas here
The Human Advantage: The Future of American Work in an Age of Smart Machines 2018
The Glass Cage: How Our Computers Are Changing Us 2015
Managing IT as a Strategic Resource 1997
Beyond the IT Productivity Paradox 1999 – old but still interesting

Not recommended but still on the RPA topic

In The Age Of The Smart Machine: The Future Of Work And Power 1989
The Lights in the Tunnel: Automation, Accelerating Technology and the Economy of the Future 2009
A Dangerous Master: How to Keep Technology from Slipping Beyond Our Control 2015
Rise of the Robots: Technology and the Threat of a Jobless Future 2016

 

We also mentioned using ternary operators

and Alternate Data Stream as data storage

Here’s the code Jackie walked through.

 

Using AutoHotkey Text Functions in Excel

In this example I demonstrate how to use AutoHotkey string / text functions on text that is in Excel.

 

XL:=XL_Handle(1) ; 1=pointer to Application   2= Pointer to Workbook
MsgBox % XL.range("A1").Text

MsgBox % SubStr(XL.range("A1").Text,6)
MsgBox % InStr(XL.range("A1").Text,"and")
MsgBox % StrSplit(XL.range("A1").Text," ").3
RegExMatch(XL.range("A1").Text,".*?(\d+)",Numb)
MsgBox % Numb1

XL.range("A1").Value:="This didn't work"



;********************Connect to current Excel Worksheet***********************************
XL_Handle(Sel){
  ControlGet, hwnd, hwnd, , Excel71, ahk_class XLMAIN ;identify the hwnd for Excel
  Obj:=ObjectFromWindow(hwnd,-16)
  return (Sel=1?Obj.Application:Sel=2?Obj.Parent:Sel=3?Obj.ActiveSheet:"")
}
;***borrowd & tweaked from Acc.ahk Standard Library*** by Sean  Updated by jethrow*****************
ObjectFromWindow(hWnd, idObject = -4){
  if(h:=DllCall("LoadLibrary","Str","oleacc","Ptr"))
    If DllCall("oleacc\AccessibleObjectFromWindow","Ptr",hWnd,"UInt",idObject&=0xFFFFFFFF,"Ptr",-VarSetCapacity(IID,16)+NumPut(idObject==0xFFFFFFF0?0x46000000000000C0:0x719B3800AA000C81,NumPut(idObject==0xFFFFFFF0?0x0000000000020400:0x11CF3C3D618736E0,IID,"Int64"),"Int64"), "Ptr*", pacc)=0
      Return ComObjEnwrap(9,pacc,1)
}

 

How to use Simple Text Encrypting to prevent keeping your passwords stored in plain text files – Keep hackers away in 2021!

Simple Text EncryptingIn one of my videos on what I’ve automated lately, I demonstrated the little tool I wrote to encode / decode text (typically passwords). Someone asked if I could share the code so I’m doing that here. In case you missed the video, I created a shorter one just on this topic below.

Text Encrypting Code

How to use Simple Text Encrypting

 

 

Merging Files with similar structure but removing duplicate headers

I often get text files of similar type (Tab delimited, CSV, etc.) but they all have a header row.  A super easy way to merge the data together is to

  1. Created a folder that only has the files you want to merge
  2. create a command prompt in the directory
  3. use the following dos command to merge the files (adjusting the extension to your purpose:  copy *.csv  merged.csv

This will merge all of the files ending in .csv into the merged.csv file however it keeps all the header rows. 🙁   This annoyed me so I wrote a short program to use AutoHotkey and only keep the first header row.

Continue reading