To build an entire RPA from scratch is tough. But to change and tweak someone's RPA code is much easier.

Let's learn how to modify an AutoHotkey script in this article.

1. Edit the Script

  1. Make sure you have test drive AutoHotkey in the article: 02. Running AutoHotkey Scripts
  2. Download the following file if you haven't: autohotkey sample01.ahk
  3. Right click on the file "autohotkey sample01.ahk", and elect "Edit Script".
  4. AutoHotkey Edit Script

  5. The file "autohotkey sample01.ahk" will be loaded into Notepad:
  6. AutoHotkey Edit Script in Notepad

  7. Scroll to Line 21, and change This email address is being protected from spambots. You need JavaScript enabled to view it. to your own email
  8. AutoHotkey Edit Email

  9. Remember to Save the modified script by using File-Save or press Ctrl-S

2. Run the Script

After you have modified the script, it's very very important that you re-run the AutoHotkey script again so that the modified script is being loaded.
  1. Again, make sure you have saved the modified script in Notepad.
  2. To re-run the modified script, double click on this file: autohotkey sample01.ahk
  3. If you see the following pop-up, just click Yes. This will load your modified script to replace the previous version. If you see this, you are good to go! You can now start to use your modified Hotkeys or Hot Strings.
  4. AutoHotkey - rerun

  5. If you see the following, it means there are some errors in your code. You need to go back to Notepad to fix those errors.
  6. AutoHotkey - errors!

3. Doing More with AutoHotkeys

AutoHotkeys has been around for more than 10 years. Starting from a simple keyboard macro, it has evolved into a full-fledged programming language with variables, functions, objects, loops, regular expressions, etc.

With AutoHotkeys, you can simulate any mouse clicks (left-click, right-click, middle-click, double-click, etc.) and keystrokes e.g. F1, F2, PgUp, PgDn,Home, End, Ctrl, Alt, Shift, Tab, Esc, etc. You can refer to this article on how to simulate all these keys: 04. AutoHotkey - Commonly Used Keys

If you have any questions on AutoHotkey, simply google for it. For example, you can google for "How to loop through all the files in a folder". You will be able to find a lot of AutoHotkey tips, techniques and sample codes on the Internet.

Add comment

Submit