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

Antivirus deleted all our .ahk files | AutoHotkey News May 2nd 2024

Howdy,

This morning I went to edit one of my AutoHotkey scripts and, to my surprise, it wasn’t there❗  Not only was it gone but the 7,733 .ahk files on our shared drive were also missing.  ☹

What would you do if all of your AutoHotkey scripts disappeared and were not recoverable?

Thankfully everything I do is under DropBox so we did a little digging and noticed that Rizwan’s new laptop had deleted all the files .  More specifically Windows Defender on his computer had deleted them (and DropBox obediently deleted them on all of our computers).

Thankfully, DropBox has a nifty feature to “rewind” folders based on a time period so it was easy to restore everything however this begs the question:

Why did Windows Defender delete them in the first place?

Antivirus software typically flags, and deletes, executables (like AutoHotkey.exe) but I’ve never heard of it also deleting the associated files.

This would be like deleting all your Excel Spreadsheets or Word documents if the respective Excel or Word executables were flagged.

It looks like Windows Defender is now using “AI” to broaden the files it flags when searching for viruses.  I could be wrong on this however I have no other way to explain the deleted files.

BTW- The latest AHK v2 build, 2.0.13, has been flagged much more than past versions.  Is there something wrong with this version?  Not likely!  If you watch this video you’ll see how I demonstrated that poor Antivirus tools are at actually detecting viruses.  They’re really detecting “power”, not intent!

AutoHotkey is an amazingly powerful tool! Which is exactly why so many Antiviruses flag it!  Why this particular build is getting flagged more than others is currently unknown however I’m pretty confident the problem is with antivirus tools NOT AutoHotkey.

BTW- As mentioned earlier I have everything under DropBox (and I have backup copies of DropBox) but I’m also going to start using this script which allows you to, easily, backup AutoHotkey files to a new location changing their extension (in case antivirus flags them in the new location).  You can see that script demonstrated in this video

Now on with the show…

Don’t lose all your AutoHotkey scripts Antivirus is evil
Don't lose all your AutoHotkey scripts Antivirus is evil

Learn how to Master VSCode Make the switch to v2 Intro to AutoHotkey Intermediate AutoHotkey Intermediate Objects GUIs are Easy w/AutoHotkey Access all our Courses; Quit when you want

How to use FindText in AHK v2 to Easily Find and Click images

I was talking with a hero member and mentioned there is  a v2 version of FindText but realized I hadn’t created a video documenting it so I had Isaias join me in this video.  While FindText is incredibly powerful, I really don’t care for the interface and how complicated it is to use.  It’s why we created AutomateMyTask

How to use easily find and click images with FindText v2
How to use easily find and click images with FindText v2


How Joe is an Idiot!

After creating the above video on FindText I decided to update AutomateMyTask to v2 because our tool is much simpler.   I realized we should have a “wizard” to help break-up the steps.  I also decided to have two approaches (one based on location, the other on ImageSearch but I realized I was missing out on the obvious and documented what an Idiot I am in this video.

How Joe is an idiot Updating AutomateMyTask
How Joe is an idiot Updating AutomateMyTask


17 times AutoHotkey is Case Sensitive

This week we released this video documenting 16 times AutoHotkey is case sensitive (plus one bonus “gotcha”.)  Several of these are things we run into a lot while others are ones that will surprise you.
Just curious, how many can you name before watching the video?

16+ 1 bonus “gotcha” times AutoHotkey is Case Sensitive
16+ 1 bonus


Improving People’s Lives: Story #2

This week I’m mentioning a personal story because AutoHotkey really saved my !  Earlier this week I accidentally spilled a tiny amount of coffee on my keyboard.   Sadly it was enough to “fry” my “v” key.   Not a big deal you think (as v isn’t a very popular letter) until you remember that you use the v to paste!  So I ordered another keyboard but what to do meanwhile?

I simply remapped Alt+b to send the letter v and my browser-back button to send Control+V.  In 30 seconds I was back in action!


What we’re reading


AI / Chat GPT-3 News / Usage


⚡️Productivity tips:  Adding a New Worksheet to Excel

Insert a new worksheet in Excel by hitting Ctrl + Shift + F11


A spot of Humor Gotta Love George

George Gets Obsessed with a Beautiful woman’s boyfriend.

George Gets Obsessed With A Beautiful Woman’s Boyfriend| Seinfeld
George Gets Obsessed With A Beautiful Woman's Boyfriend | The English Patient | Seinfeld


What we utomated this week with AutoHotkey #43

In this week’s video discussing what we Automated with AutoHotkey I mention some cool new tools coming out soon.  FFmpeg is an amazing tool which we’ve wrapped in many scripts.

What we Automated with AutoHotkey #43
What we Automated with AutoHotkey #43


Testimonial

This week’s testimonial comes from a long-term client of ours.   It’s a simple quote I captured from a text he in reply to me upon delivering our tool which was:

“How can I pay more for this?” — Kelly C.


AHK Hero

Consider joining the AHK Hero club! Members receive 25% off courses, consultations, tutoring, done for you project work, etc.    Currently we have over 245 hours of recordings teaching AutoHotkey that is exclusive to AHK Hero members❗

During this Friday’s call we’re planning to discuss:

  • Member’s Code / Questions
  • Avoiding losing all your AutoHotkey work / backing up AHK files
  • Assigning an Object to a variable
  • Parent / child GUIs
  • Signing Executables to avoid flagging by AntiVirus
  • Auto-building folder structure during recursion with FileCopy

They also have access to exclusive & pre-released content and a 3 hours a week where we help people with their AHK issues (the Saturday calls are geared towards people new to AutoHotkey.)


️ Quotable quotes

  • Put systems in place that allow ordinary people to do extraordinary things Joe Glines
  • Curiosity can empower or impede you James Cleary
  • Today is always the most productive day of your week Mark Hunter
  • It’s like deja-vu, all over again Yogi Berra

AHK Newsletter⏩SHARE WITH A FRIEND⏩

Do you know someone that would benefit from learning useful automation tips like the gems in today’s issue?  Take a second and forward this newsletter and bask in the glow of their undying gratitude.  Was this email forwarded to you?

Sign up for this Newsletter hereWe never share your email with anyone.  Ever!


The-Automator

Joe, Isaias, Irfan, Rizwan and staff


P.S. Please be sure you read the intro carefully.  I can’t imagine what it would be like to permantely lose all my AutoHotkey work!

BTW- I informed AHK Hero members of this right when it happened via our private Telegram group.   As they say, membership has it’s privileges!

AutoHotkey Webinar 10/2021: Creating and Using AutoHotkey Functions

AutoHotkey webinar AutoHotkey functionsHour 1: Intro to Functions

Hour 2: Q&A Styles and helping Attendees

Script Highlight:  Times around the world by jeeswg

The Automators’ Podcast 

#113: 7 reasons to talk to others about your programming
#114: 5 tips how to reduce the amount of personal support you provide
#115: What is an idea worth? How much $ should you pay the “idea person”?

Resources presented in Webinar

What is a Function?

  • A function is similar to a subroutine (Gosub) except that it can accept parameters (inputs) from its caller.
  • In addition, a function may optionally return a value/values to its caller.

66 Built-in AHK Functions https://www.autohotkey.com/docs/Functions.htm#BuiltIn

  • Polythene’s Command functions https://github.com/Paris/AutoHotkey-Scripts/blob/master/Functions.ahk
  • jeeswg commands as functions (AHK v2 functions for v1) https://www.autohotkey.com/boards/viewtopic.php?f=37&t=29689

Some main benefits of Functions

  • They can be used without storing value
  • You can have multiple on one line / nest
  • Scope is limited (both a blessing and a curse)
  • You create functions to “wrap” complex code which greatly simplifies it’s usage
  • Via a DLL call you can leverage TONS of functions outside AutoHotkey!
  • Variadic functions take a “variable” number of parameters

Built-in AutoHotkey functions

  • Using built-in Functions (here are a couple examples)
  • SubStr(String, StartingPos [, Length])
  • Round(Number[,N])
  • Trim()
  • StrSplit(String , [Delimiters, OmitChars, MaxParts])

Highlights:

  • Positional parameters (the order matters they’re not named parameters)
  • Required parameters
  • Optional parameters

Creating your own Functions in AutoHotkey

  • Why you want to create them
  • Defining a Function verse Calling a function
  • Working with SCOPE
  • Global
  • Static
  • byRef

What we’ll cover:

  • Accessing variables outside your AutoHotkey function
  • Passing parameters
  • Setting default values for your parameters
  • Returning value
  • Returning more than 1 value (byRef & Objects/Arrays)
  • Using the #Includes directive and Function Libraries

Biggest things that will trip you up!

  • Scope seems like a design flaw however it is a great benefit. Most noobs (and even seasoned programmers) will sometimes forget they are inside a function and try and access a variable outside the function
  • Forgetting you returned an object and trying to access it as a variable
  • Making something Global and then reusing the variable in something else

Skins & Styles – Dimitri  (I’ll work on a working example to include here)

Dimitri Geertz joined the webinar and demonstrated his work using the skinsUSkin.dll.

You can learn more about it here in the forum post

or this post from CodeProject

I made this video which shows how simple it can be.  You can download the script below

AutoHotkey v1 and v2 Excel function library

Over the years I’ve done a lot in Excel.  Often I leverage my Excel function Library which is, at best, a work in progress.   I commissioned Maestrith, author of AHK Studio, to review it.   We worked through what did & didn’t work plus optimized a few things.

And now we just converted it all to v2!  So now our download has the Excel Function library for both v1 and v2

AutoHotkey v1 and v2 Excel Function Library