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

AutoHotkey Webinar- Using AHK string functions in Excel

webnar 300x200AHK 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.

 

AutoHotkey Webinar- Finding presence of text in a large file

AutoHotkey webinarIn this working-session webinar we helped Dimitri with a project he was working on.  In short, he is looking for specific text in a “large” text file.  We discussed various approaches to the solution and created a few example solutions

Script Highlight:  Control panel objects by jNizM

Several things to consider before writing a solution

1.Just how large is/will the text file get?

A.Is the file going to be appended to over time?

2.Do you just need to answer “is the text value in the file” or do you need more information

A.how many occurrences

B.which lines it is on

C.other values related to it (key-value pairs, other fields, etc.)

3.Do you care if the text is found multiple times?

4.How important is speed

5.Would a “fuzzy search” help?

6.Will you be running single or multiple searches?

Possible Approaches for finding text in a large text file

  • Use InString on file read (see below example)
  • Shove it into an Object  (see below example)
  • Use built-in ADO database query by VXE
  • Use SQLite3

Simple InStr solution

Loop,Read, B:\the-automator\Webinar\Scripts\2020-01-Working Session\Dimitri\glbintf3.dat ;loop over data file (line by line)
  if InStr(A_LoopReadLine,"ENP-001213") ;If there is a : in the row, then proceed
    m(A_LoopReadLine,A_Index)

Shoving into an Object

  obj:={} ;Create object for storing data
  Loop,Read, B:\the-automator\Webinar\Scripts\2020-01-Working Session\Dimitri\glbintf3.dat ;loop over data file (line by line)
  {
    if InStr(A_LoopReadLine,":"){ ;If there is a : in the row, then proceed
      RegExMatch(A_LoopReadLine,"(\d+:)(\s+)?(?<Str>\S+.*)",arr_) ;Grab everything to the right of the : and push into Arr_Str
      obj[arr_Str]:=1
    }
  }
;********************Show all in object***********************************
  for k,v in obj
    output.=k "`n"
  MsgBox  %output% 
  
;********************Loop and find your value***********************************
  for k,v in obj{
    if(InStr(k,"ENP-003066"))
      m(k)
  }

 

 

Using the Autohotkey StringSplit / StrSplit() function to slice strings

autohotkey StringSplitAutoHotkey Merchandise-White Stress ballUsing the AutoHotkey StringSplit / StrSplit() function

AutoHotkey has some pretty cool functions for slicing strings. Not quite as robust as Python however they definitely cover the majority of needs with ease.  In the below video I demonstrate some simple usage if it as well as a way to access the Array it creates without ever saving it to a variable!  🙂

Tutorial demonstrating AutoHotkey StringSplit function

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