About AHK and RPA tools - Is AHK one of them? Is it robust enough?

Discuss Autohotkey related topics here. Not a place to share code.
Forum rules
Discuss Autohotkey related topics here. Not a place to share code.
letacio
Posts: 48
Joined: 08 Mar 2018, 16:05

About AHK and RPA tools - Is AHK one of them? Is it robust enough?

Post by letacio » 14 May 2019, 19:49

Hello everybody!

I've been using AHK for 2,5 years now, and i would like to use it for a living (or most of it) in RPA (which would be the main use i think, maybe some automate testing as well).

But i've got some questions. For instance, i don't know if i should focus on AHK, or if i should focus on other tools (UI path, for instance).

I ask this because sometimes AHK seems not very robust, or the scripts are not that stable, needing much detailing, sleep times, and not being able to fully "integrate" to the tasks im doing.

Like browsing the web with x,y mouse clicks , tabs, sleep times to wait for page to load, and so on.

I have the impression that other RPA tools are far more robust, and "integrated" to windows/browsers and stuff, doing tasks at a lower level, and more stable way as well. (instead of click x,y position, get element for the control, and send a click, for instance).

From what i've read so far, other RPA tools are almost the same as AHK (built "on top" of it, you may say). If it's possible to get elements, they do. If not, they do mouse clicks/tabs the same as ahk, and so on.

All that said, i have 2 main questions:

1) Are RPA tools the same as AHK, but with higher level controls, and more "user friendly", reducing the need to know how to program?
In other words: Can AHK do the same as other RPA tools, and be considered a self suficient RPA tool i could specialize in?

2) About RPA in general: is it DIFFICULT (maybe difficult is not the word, "takes a lot of work" would describe it better) most of the times, needing a lots of complex checkings, loops and so on, to reduce the tons of "sleep times" so the script does not skip steps and so on? like, scripts must be very precisely tailored in some ocasions, OR its only my lack of knowledge that makes that so difficult?

I ask this because i know there are taks which are easily acomplished, when you can for instance, use some COM + javascript to automate a web browser, and everything goes awsome, but others, as a job i've done recently, with a very old browser program where there was no F12, not NOTHING to "grab" the program on low level, so i needed to do it all with clicks, tabs, sleeps , imagesearchs, "winexists()" and so on (no system messages were available, if they were, i couldnt spot them).

My question is: is it normal? is it really hard in lots of cases? or im just not competent, or using the wrong tools to do it?

Hope i was clear in my text, and thanks in advance for the answers!

User avatar
Frosti
Posts: 426
Joined: 27 Oct 2017, 14:30
Contact:

Re: About AHK and RPA tools - Is AHK one of them? Is it robust enough?

Post by Frosti » 15 May 2019, 01:25

It may depends on your needs. I´ve tried UIPath and end it because I had the need for some algorithms. So I knew I had to learn a programming language. I got then, in a short time, very good results from AHK. And yes sometimes I thought also like you. I thought AHK isn't robust, but now with more knowledge, I learned that everything has more than one aspect. In the beginning I simulate the human inputs with keyboard and mouse inputs. There is a must to use many sleep commands, that can't be robust!

So I watched the behavior of my software and my employees. I started to get deeper into Windows. I've learned dss good RPA without hooks (system announces events) is not to do. And now I've done it in part, that you can not even notice that a second software is there and does your job. It feels like features of my office software. My software supervisor has more than once wondered what their software does to me. They did not know that their software could do this at such a speed. Autohotkey sometimes intervenes so quickly that some windows that sometimes interfere with the process are no longer visible. My supervisors then think that their software is flawed and I often forget that I had programmed something.

I think good RPA software should be unremarkable. I never thought that this is possible. Yes, but that's a lot of work and usually not affordable for a small business. It has just become my hobby and I am often very dogged to get absolutely faultless. Often there are rare events and I also always want to know and handle these events. This is a crazy effort.

When I started RPA, I had a motto that still applies today: "The computer has all the data, and with that, he knows what's happening. He should do the work!"
So I bring together things that were not actually programmed for each other, to something new. I was not sure that this is as easy with any other software as with Autohotkey. At UIPath, I quickly reached this limit.

rafe
Posts: 2
Joined: 25 Sep 2020, 11:53

Re: About AHK and RPA tools - Is AHK one of them? Is it robust enough?

Post by rafe » 08 Jan 2021, 16:09

This is a great discussion! I'm glad to hear that AHK is good for RPA.
@letacio, how did it go with AHK for RPA? Still using it?

SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: About AHK and RPA tools - Is AHK one of them? Is it robust enough?

Post by SOTE » 22 Jan 2021, 20:56

letacio wrote:
14 May 2019, 19:49
I have the impression that other RPA tools are far more robust, and "integrated" to windows/browsers and stuff, doing tasks at a lower level, and more stable way as well. (instead of click x,y position, get element for the control, and send a click, for instance).
I will compare AHK with who appears to be the leader of the RPA tools at the moment, UiPath. I will also bring OpenRPA into this (https://openrpa.dk/).

What UiPath really has over AutoHotkey is Orchestrator, which is an additional tool to manage multiple robots in remote locations. However, AutoHotkey created bots (programs) can be integrated with OpenRPA's OpenFlow, that performs a similar purpose.

Among the other dirty little secrets about UiPath is it is really pushing Visual Basic .NET in disguise. You are often typing Visual Basic .NET code into boxes. So much so, that I would suggest taking a basic video course on Visual Basic .NET, if learning UiPath. UiPath doesn't go super deep into Visual Basic, but it's good to be familiar with it's syntax and control structures. Because you will need to understand how to program, even though UiPath's marketing team tries to obscure the truth (arguably lie about this).

From what i've read so far, other RPA tools are almost the same as AHK (built "on top" of it, you may say). If it's possible to get elements, they do. If not, they do mouse clicks/tabs the same as ahk, and so on.
Actually, the Plan B for RPA tools is their version of ImageSearch/OCR, and then Plan C is mouse clicks, tabs, etc... Plan A is recognizing controls directly. However, there is a difference between doing this on the Desktop VS with Web Browsers. AutoHotkey arguably has the overall advantage on Desktops, where RPA tools are much more sophisticated at integrating with Web Browsers. They do this by using Add-ons (Firefox lingo) or Extensions (Chrome/Edge lingo).

For the most part, these Add-ons/Extensions are accessing CSS Selectors, the DOM, and allowing for adding some JavaScript when helpful. To see non-RPA examples of this, you might want to check out the Add-ons/Extensions AutoControl (https://www.autohotkey.com/boards/viewtopic.php?f=74&t=82730) or Chrome.ahk (https://www.autohotkey.com/boards/viewtopic.php?t=42890).

Another point is that both UiPath and OpenRPA allows you to code in AutoHotkey directly. Burque505 also mentioned another RPA tool, techforce.ai (https://www.autohotkey.com/boards/viewtopic.php?f=78&t=84607), that also allows coding directly with AutoHotkey, but I haven't played with it. In the case of UiPath and OpenRPA, with OpenRPA integration is easier and all Sequences could be primarily composed of AutoHotkey code and you can rely on the internal logic of that code for troubleshooting. With UiPath, things can get a bit tricky, but it is doable. With UiPath, it's more that you would use AutoHotkey as part of what you are doing overall, versus writing almost everything in AutoHotkey. In other words, I think an AHK coder would get up to speed with OpenRPA faster or find it more intuitive to use than with UiPath. But... UiPath has a huge selection of free training and videos.

Knowing AutoHotkey is a huge advantage in RDA/RPA. It means that you are less likely to get stuck or have more options to get things done. Clearly RPA tools are aware of this, thus they allow for integration with AutoHotkey.

Special mention needs to be made about Pulovers Macro Creator (https://www.autohotkey.com/boards/viewforum.php?f=63), which is not that far removed from being a RDA/RPA tool.

1) Are RPA tools the same as AHK, but with higher level controls, and more "user friendly", reducing the need to know how to program?
In other words: Can AHK do the same as other RPA tools, and be considered a self suficient RPA tool i could specialize in?
RPA tools should be thought more of as sophisticated applications that work with various programming languages (a little like say Excel does with VBA and macros), where AutoHotkey is a scripting language that you can use to do things or make RPA/RDA applications (see Pulovers Macro Creator). RPA tools like UiPath will not really reduce the need to know how to program. Their marketing teams are arguably lying. If you were to use UiPath at a professional level, the more familiar with Visual Basic .NET, JavaScript, HTML, and CSS that you are, the better off you will be.

Part of the issue for companies has nothing to do with the application or programming language, but has to do with support. Usually they need their bots up 24/7 (all the time). If those bots go down, it costs them money. So a third party company with customer support and developers need to be always at the ready. This is reflected by the tools of Orchestrator and OpenFlow. You as an individual developer need to sleep, and do other things in life. It's a team of customer support and developers that companies need.

Yes, you could program a bot entirely in AutoHotkey. But the issue will come with the 24/7 support, monitoring, maintenance, updates, rapid response, troubleshooting resolution speed, etc...

2)
About RPA in general: is it DIFFICULT (maybe difficult is not the word, "takes a lot of work" would describe it better) most of the times, needing a lots of complex checkings, loops and so on, to reduce the tons of "sleep times" so the script does not skip steps and so on? like, scripts must be very precisely tailored in some ocasions, OR its only my lack of knowledge that makes that so difficult?
I think this is a matter of if the person is doing it professionally versus a hobbyist. Professionally, you need to integrate a lot of troubleshooting code, so that if any phase or task fails, there will be an alert and a strong idea of what went wrong. Professionals would need to prove that the program meets the requirements that were given and works properly.

I ask this because i know there are taks which are easily acomplished, when you can for instance, use some COM + javascript to automate a web browser, and everything goes awsome, but others, as a job i've done recently, with a very old browser program where there was no F12, not NOTHING to "grab" the program on low level, so i needed to do it all with clicks, tabs, sleeps , imagesearchs, "winexists()" and so on (no system messages were available, if they were, i couldnt spot them).
I think this is relative to skill level. Advanced programmers and professionals will be able to figure out various ways to get it done, or not take or get the job.

swub
Posts: 19
Joined: 25 Feb 2019, 09:16

Re: About AHK and RPA tools - Is AHK one of them? Is it robust enough?

Post by swub » 06 Jul 2022, 08:20

I have been using AutoHotkey for a few years and then my position at work decided to automate various tasks with UiPath - One of the things I can recall that struck me a odd about UiPath was, if I needed to send a space key you did not put anything in just us a space key. AsyoucantellifIdon'tputaspacekeyinyoucanstillreaditbutit'smuchharder. Thanks' to AutoHotkey for the {SPACE} key! Another key that seems to be missing from UiPath is the {AppsKey} or Menu key for right-click context menu.

With the price of UiPath being so high you would think they could have included these two keys! :o

Post Reply

Return to “General Discussion”