## AutoHotkey Webinar- Using AHK string functions in Excel

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

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

We also mentioned using ternary operators

and Alternate Data Stream as data storage

Here’s the code Jackie walked through.

## I can’t tell you the # of times AutoHotkey Variadic Functions come in handy

AutoHotkey Variadic Functions can be incredibly handy when you don’t know the exact number of parameters.   The below example shows some simple math where you can pass any number of parameters to be added.  It also demonstrates how you can use MaxIndex() to determine how many parameters were passed to the function.

```Browser_Forward::Reload
Browser_Back::
MsgBox % math(1,2)
MsgBox % math(1,2,3)
MsgBox % math(1,2,3,4)

math(x*){
tot:=0
for k, y in X
tot:=y + tot

loop, % x.MaxIndex() ;Loop over the # of parameters that exist
Indiv.=	x[A_Index] "+"

return SubStr(Indiv,1,(StrLen(Indiv)-1)) "=" tot ;use substr to remove the last + sign
}
```

## Use ByRef to Return Multiple Values from AutoHotkey Functions via

In my initial video I talked through how & why to use AutoHotkey functions as well as how to return one value from a function.  This video will demonstrate how to Return Multiple Values from AutoHotkey Functions via the byRef command.  You can also return multiple values by returning an Object or an Array which can hold any-number of values..  The byRef command can seem a bit tricky at first, but it really is an easy way to return many values from a function. My next video will cover using the Include command

## Intro tutorial on using AutoHotkey functions to streamline code

AutoHotkey functions are a true gem that help streamline your code, make it more readable, easier to maintain, and avoid conflicts with other variables (because their scope is local by default.  They take a little practice getting used to however they can save a ton of time and allow for re-using a ton of code.   Don’t get hung-up on writing them at the beginning of your script.  Often I go back after writing my script and realize I should have written a function in place of a subroutine.

My first video on AutoHotkey functions explains why & how you can use them.