We had an amazing AutoHotkey Hero webinar the other day discussing 18 unique ways to Automate programs with AutoHotkey.
Normally our AHK Hero sessions are spent helping with their scripts / projects and discussing how they can create more stable, reliable tools.
In this webinar Isaias Baez and Joe Glines leaverage their combied 30 years of AutoHotkey experience to discuss 18 independent ways you can use AutoHotkey to connect to and automate Windows programs. Most people using AutoHotkey know about a handful of techniques and often end up seeing everything as a nail because all they have is a hammer. At the beginning of the webinar we discuss what should be considered when deciding on an approach. Make sure you grab the download below which has amazing links to each method!
hey everyone today we’re doing a special Autohotkey Hero session where we’re doing like a mini webinar for hero members I’m going to stream this to YouTube later but hero members only ones that can be attend and ask questions so and before we get started just because here’s the thing like the AHK HERO program I think is an amazing value and we have hero members here and I think a lot of the people that that especially attend our YouTube sessions the live sessions on Friday mornings should be hero
members right like they’re they’re Prime fit for it and it’s not that I’m trying to make the money it’s at the values there and so if some of the heroes want to chime in about what do you like about the program is it worth the money you’re spending yeah I mean it’s you know there’s very regular calls you know there’s a lot of experienced users so you know that’s where that’s where the value is right it’s we get to pick Isaiah’s brain and you know ask
questions in a group setting I think it’s great the other thing they did affords you is the ability to listen to approaches and topics and ways of doing things that you may not have thought of and maybe it isn’t going to be immediately useful to you but maybe in a week or a month or whatever you know you’ll be in somewhere looking at something and you’ll remember oh yeah this was discussing this command was discussed or in a different approach that may never have occurred to you so you do get a lot of exposure even if
you’re not actively doing something at the time yeah we talk a lot about how it’s really important to to listen to what other people are doing and you sometimes things jump in your head of like oh my God I never thought about doing that yeah right now the webinar today is especially about that we’re gonna show 18 ways to automate programs so probably a few of them you know but maybe there are others that you don’t know and even if you don’t learn them right now it might come on handy at other points well so let’s go ahead and
jump into it now I have a document here so this is some of the first things you need to think about before you pick on the approach you’re going to take right it’s just things that you need to no matter what you’re doing without a hotkey any anything you’re automating right is it one is the library I’m going to use an internal thing to add a hotkey or am I going to be relying on external libraries like for instance the UIA Library possibly or doing something we’re not covering by the way we have a
whole different webinar which I’ll put the link up here on nine different ways to automate browsers right because that is a whole different topic but it’s just a good example of with browser automation there are several different approaches using different libraries external libraries is it going to be something that could be run real are you going to be running your script on one computer or is it going to be on multiple computers if you know sometimes if I’m just running stuff on my computer I I take a much simpler quicker dirtier
approach than if it’s something I’m going to share with other people then something critical it’s one of our first questions we ask at the beginning and then the speed of how fast it’s going to run which often that doesn’t really matter overall but it does play into effective depending how many times you’re going to use it or how many people are going to be using the tools that’s something you do want to consider a big huge one right is the skill level of the person writing the automation is it and new to
automating you don’t want to be trying to do something very very Advanced right it makes it much more difficult another really big one which is this is what’s good because I actually did the video on this a couple years ago now I think of these 17 ways but the context has changed and a lot of the ways that we used to love they’re just getting older and most newer programs don’t have that infrastructure in order to automate them so if you know it’s really great if you can automate something but if that doesn’t apply to
the program you’re using it’s kind of useless right so there’s that approach another huge one is the number of examples of tutorials and how do you learn how to take that approach right which is one of the big things with UIA we’ll get into before UI was cool but there were no libraries really to use it and now there’s some really cool libraries with some good trainings we’ve done videos on and I’ve seen other channels do them and then the whole thing of AHK V1 versus AutoHotkey V2 which version of
Autohotkey are you going to be using can really have a huge effect of course of which approach you’re going to take right you see on the point that you mentioned reliability on one computer which is like things that you’re going to do for yourself another thing that is related to that is the fact if it is if this is a one-time thing so if I’m gonna go ahead and automate something just to get out because I have to do 50 clicks or whatever I just do it at one time I don’t care that he’s reliable because I’m not going
to use it a second time or a third time or whatever but it goes into the category of yeah is it just for you yeah is it just one time that you’re going to run it then yeah that might be another thing to take into consideration now for the webinar where we talk through the the scores that we gave it of course because we thankfully because of isaiahs and maestrius and other people that are working for me they’re experts right so and and theoretically we should all aspire to be experts because you just it you have more Tools
in your toolbox right you have more approaches and this and that so the ratings we’re going to give this are from us but depending on your skill level just so you need to take that into account of like well do I really want to learn how to do all these other things right but for us it’s the we’re going to assume because this is what we do for a living right we do this on multiple computers which more often than not it happens a lot where you think it’s just going to be yours but then you end up
sharing it with other people or they do and so we also take that context reliability over speed this isn’t speed like Hey I want to have a 3,000 line sleep it’s just how fast it’s going to work but we we don’t usually worry about that we worry about is going to be consistently accurate yeah so that’s where we put our our priorities there’s an expert doing as I said and then now we’re doing everything in V2 however sometimes there are some things that are just a V1 thing right so here
are the different approaches let me see if I can get a good there we go that’s decent yeah and here what I’ve done is is Ace and I beforehand had talked through and this is a the cheating way to do it is we’re going to go through each one of these these are some of the things to highlight the differences in V1 versus V2 and what you want to keep your eye on and stuff when you’re comparing the two but I’ll I’ll share the link to this document later and I’m going to go add a few more links for some of these new
libraries for v2 you know sending Mouse clicks and keystrokes kind of like we do with Automate My Task and other stuff we can do it a four or a seven and it’s kind of funny because nine out of ten times you almost never see we don’t talk about sending keystrokes right however there are this came up with a client is he is he on here I don’t see him right now Jeff we were doing stuff and he was trying to use UIA for automating something but he was automating a browser and it was quite complicated
well no it wasn’t a browser it wasn’t it was it was a normal program but the problem and it was really tough to navigate around and Isaiah was trying to explain to him yeah we don’t always go with UIA depending on what you’re doing because with actually with Connie in one of our tools we were having problems with both UIA and even ACC he’s been having other problems with it right those are external libraries that are I mean desk a lot is a friend to the channel right into us and we can help
him work on the library but it’s out of you know it’s it’s not is not native to Windows right right right well here’s the thing so where would I go ahead and use sending keystrokes specifically if I’m navigating so there’s some some locations where you can use the up and down arrows the tabs the enter key in the in one example the per one of the people that we were working with we couldn’t navigate easily with up and down arrows I think this is the problem that Corning is facing that his program
you cannot navigate with the arrows and hit enter to enter into a window so he has to click on them in that case we go with UIA because we can find the object and try to click on it but in other situations like Geoff what happened was that we couldn’t click easily so then at that point we switched in that situation just to sending a tab and then an enter and then an ALT n to open whatever it was it is easier the thing is it is reliable up to certain point the main issue with it is if while you’re sending the keystrokes you type
that’s going to affect what you’re doing if the window that you’re sending the window the keys to loses Focus that’s another problem so again it’s not 100 percent reliable that’s why we didn’t give it more than a seven out of ten but it is reliable and it is easy to understand and easy to use right it’s not anybody could go ahead and learn that one really really easy right yeah the other thing I would say is to keep in mind when you’re doing this and this has come up time and time again right and I mentioned a bit
earlier too when you start down a path with a given any one of these tactics the approach you’re taking usually like is this will be working on something and he picks let’s say using UIA right and he’s going on the path and he gets stuck on something this morning he doesn’t necessarily come to me to advice on how to use UIA but we’ll talk through something the the thing is his brain is down the path of UIA and when someone else comes into the conversation also they’ll be like well why don’t you
just send a keystroke or why didn’t you take a different approach entirely right yeah which is just for Coney right now yeah you’re having issues with that little control hey is there any other ways that you can toggle that control without UIA you can use UIA for anything else but can you hit enter and it works then just send enter right so just recently I was on the call with maestriath discussing something and then I said hey you know we’re having a problem with this other thing with our tool and he’s like well
in SQL you could do a recursive query and I’m like what so he offered up something that I wasn’t aware of in SQL that you could actually do in it just the point is we all have different knowledge bases and our experiences stuff so it really helps having a community having other people to talk to whether you use the Forum whether you use the hero group or whatever right have a place where you can talk to other people that have different backgrounds because it really helps now that with this code can you uh
refresh well so the scope in from V1 to V2 we recently I think yesterday we talked about scope and functions so where you’re referring to that type of scope well in the example when we were making the video for the the V2 intro to V2 and we added a hotkey and then it was just like sending Mount you know we were trying to send keystroke or Mouse clicks actually in the example and it was just a reminder scope in V2 is very very different than V1 yeah so just keep that in mind when you’re working with them so
especially when you’re sending clicks and those kind of things yeah getting a location and then sending a click there and stuff so it’s just something to keep in mind right now image search and pixel search those are the ones that we try to avoid as much as we can the reason for that is that they are really unreliable on others people’s computers and even your own even in your own computer an image when you take the screenshot might look a little bit differently than when you are using the program so if you took a
screenshot of a button with your mouse over it it might have a different color than when you put the mouse away so the pixel or image searches might not work as intended so it’s really unreliable we use it as a very very last resort we actually had a client that we were doing in automation for an older program and we couldn’t click we couldn’t use the keyboard we couldn’t use UIA we couldn’t do almost anything we had to use pixel search it is working but we know at some point he’s gonna say
oh it didn’t work in that other computer well yeah yeah we know that’s one of the issues about it yeah it’s it’s honestly like a last resort now unless which is this is where like with automate my task I have something very quick and simple to do just on my computer it’s a one-off thing I I might use it for that right like especially without my task because it makes it simple to to get your image you want to search and then write a quick Loop to program you know to click it or something makes it very very simple
um so for for a very quick simple one yeah one of the differences on view from V1 to V2 is that image search and pixel search the first parameters the X and Y locations are just variable names that you put in there in V2 you have to use an ampersand in front of those because those are variable references by ref and those variable references you already had it right yeah sorry the variable references is a thing that is near in V2 and those kind of functions that set a variable you have to put the variable references as I have
been talking about in other videos so send message and post message now I don’t know how many you guys here have actually used those well the irony as you probably all have you just didn’t realize it because Autohotkey uses them in the background they’ve wrapped it a lot a lot of the stuff that we do stuff with controls and other things you’re actually using that just don’t realize you’re using those but they’re crazy powerful they’re very fast they’re very accurate highly
reliable like they’re they’re amazing I would just trace it in a different way that’s the way how controls work win32 controls all of them work with sending and posting messages 99 of them so if you figure that one out if you learned those that’s the best way that you can automate some controls on Windows but the problem is it has a very steep learning curve because the way the things that you’re sending are structures the many times our structures and pointers to stuff we’re not used to
those so from our perspective as an expert that knows how to do that for me is a nine for you it might be a very low value one because you don’t want to spend the time understanding all what goes behind it but either way this is the most reliable fastest way of controlling many things now the shell hooks are kind of whenever you you think about a hook it’s just a notification think about it as a notification the shell which is for example the Explorer window when something happens it sends a notification and you can capture that
notification for example when a file changes Explorer might notify you that the file changed and you can connect to that notification and whenever it happens you can perform an action there’s a lot of interesting stuff that you can do with it again this is one of others that have very steep learning curve you have to understand the messages you have to know how to use them and so on they are really reliable that’s why we gave it a high score of 8 or something like that because if you’re connecting to hooks you’re doing the
best you can basically in the sense of reacting to stuff I’m going to add to that and say I’m going to slightly disagree with you not not because you’re wrong or they’re complex but there is a good function I believe it’s function library for working with them Jackie showed me in a podcast that we did so we have a good video on it it made it very simple to watch for a given window like if something happens and they’re lightning fast like they’re crazy faster that’s for sure and you can actually
enter if I correctly if I’m wrong you can intercept the thing and basically you take an action before like other things you know react to it so it’s it’s really mindless but that function library was you know it was I I followed the vid I’m like holy cow I actually understand what you’re saying like it’s not rocket science made it very simple someone did a good job wrapping it in a function library to make it simpler because you’re right it’s an advanced topic but there are ways someone’s
wrapped it where it’s not crazy hard to do in the like you said they’re they’re amazing I think for Now function is in V1 I think and after you get the hang of it yeah so it’s only V1 but after you get the hang of it you could do it in any of the two languages because the difference is not that much it’s just the fact if you have ever used the on message command is very similar it’s just you hook to a message and whenever that happens you call a function that’s it okay dll calls
they’re they’re unfortunately let’s just look at the I know from talking to you as the the V1 to V2 like he changed a lot of the stuff right the conversions things don’t have the same meaning there’s a few things that are easier but there’s another other parts that are really tricky so the other calls are great for automating Stuff that allows you to use Windows native functions and the yellow calls kind of like open the door for you to use those native functions but again if you don’t know what you’re
doing with dll calls they can be a really really tricky subject well and most examples you’ll find in the Forum and by the way we talked about it just the other day but the Forum the V2 now is like the dominant thing and there is a sub-thread for V1 questions but you know now you’re gonna have to go find the V1 stuff but those examples are all V1 and so there’s not that many examples for v2 my question too though is this is did the changes he make because I know a lot of the changes that they made to V2 were to make it more in
line with other programming languages so have you ever tried to use like a dll call from another language is it closer to that so let’s say I could go to stack Overflow maybe and see an example using a dll call is it going to be closer to that no no no the main differences between the alert calls have to do with the buy ref so any variable that will be set has to use the Ampersand for example other changes is just that you can pass buffers which is a concept that not many Autohotkey users have so that is
really tricky if you have ever used the varset capacity to kind of like set the size of a variable you don’t need to do that anymore you have to use a buffer and stuff like that so it is the change is more structural more than making it in line with other languages okay thank you now the next one which and this is a tough one because there’s X9 different of course because his and my skill levels are different clipboard is amazingly overall simple it’s it’s very handy I think it was like the ultimate Global variable right like
that’s exactly actually unless you’re just descalada who thought up of using the was it the title bar the title bar of the video yeah exactly yeah that was a fun interesting thing it’s great now we did see and by the way it’s called a underscore clipboard or actually can you use both in V2 who’s that right do you remember V2 is A_Clipboard in V1 you can use both at the same time okay right but but the the clipboard one is gone so you shouldn’t use Clipboard by itself now if you’re wondering how can I automate with
clipboard manipulation well the point is certain situations I use it for communicating between two programs so we were trying to automate some something in Chrome for example and we had an extension in there that did the automation but I did to do I wanted to do something without a hotkey that communicates with that extension there is no way to connect the two because Chrome is secured in many ways so for creating my automation I usually Resort it to clipboard sending the information through the clipboard between the two
programs to create the automation that I really needed so that’s the way how you would use Clipboard the problem is it is a global variable that any program can set so if you’re automating and you’re depending on the clipboard another program might change the clipboard unexpectedly and your program might behave weirdly you know so that’s that’s the gotcha on that one which is the reason why I told him that I told Joe hey let’s lower this core on that because even if you’re an expert and you
know what you’re doing things can happen unexpectedly and you it’s going to be really hard to troubleshoot a clipboard manipulation automation so now with controls which again they’re amazing right don’t get me wrong in AHK v2 they’ve broken them down slightly differently so they’re a little bit better organized I think it makes a lot of functions that is right but I have a lot of little functions for them yeah unfortunately most now here’s the thing if you’re this is the one of the
things like it depends if you’re actually trying to automate an older program that has the win32 controls it’s they’re amazing right most programs nowadays like what we’re looking at right now in Windows like this ribbon up here doesn’t have the standard win32 controls so we can’t I think some of the edit ones like this one might be if I still remember right like there’s a couple that are but most of them aren’t and so it’s more about the prevalence of tools that we’re trying to automate have
it this is getting the lower score it’s not that it’s not a great approach it’s that few words yeah yeah it was the best but sometimes people hire us to to work on older programs so it is still great it’s just more so you know a lot of people are automating newer programs and it’s just not something you can use for most of them right but the next one actually is a little bit more in use because even if the program has the newer controls they most of them have a menu a menu a system menu that is in line with win32 and then
you can use the menu select or winMenuSelectItem which is in V1 the name is really long it’s wind menuselectitem in V2 he said why do I have to type so much let’s just make it menu select so the name changed a little bit but it allows you to kind of like in one line select a sub item in a menu by just specifying the path that you want to reach so it is really good so if your program like for example this one here word I don’t think at the top it has a normal menu no but if you wanted to go
to home you know a line or whatever if it was sub menus you could do so in one line and that was and that was really good and it was really stable it was not something that yeah so for example here right these menus and sub menus and what correct me if I’m wrong is this my understanding of it isn’t that you’re sending this it’s not like sending alt F in there is a command that is tied to what this gets triggered what this triggers that is what you’re actually so each element has an ID kind of like a
pointer an ID and when you do the menu select whatever it is it gets the pointer to that thing and just call it directly so it is something that it is not about you know you will not see the menu open and navigate it’s not going to do that it’s actually going to call exactly the function that is in that Sub menu without even opening the menu which is why is is really stable it is really the the low score is because more and more programs are ditching the menu in favor of other controls so yeah but it’s
a really good one to have in your back pocket because sometimes it comes up and it’s like wow it’s available right use it and let’s use it and it’s very simple to program in by the way like it’s you can either use the indexes or the names of the menus so either one works and it’s really fast and accurate so yeah it’s a great approach I think everyone here we’ve we’ve seen this working with the ACC and UIA Library especially let me let me go ahead and reveal both because they’re they’re so related right
right but generally speaking though so the ACC was the windows accessibility Library which was really old and then the UIA approach circumvented it replaced it the the ACC is deprecated the UIA is the newer approach for it however again depending on the program you’re finding to control and automate you might have some issues yeah yeah so Connie right now is working in something that we tried to use UIA with but it had some issues we definitely couldn’t use the library but we used to ACC and he had made he has
made a lot of progress on it by clicking many things they the only problem with them so we do like them a lot we actually think they’re one of the better ways of approaching clicking on a GUI or getting values from a GUI very quickly you know what I would add to a disaster we didn’t mention it earlier because it because nothing else is like this the really cool thing about UIA is you can learn one approach and it will automate almost any program right so even though it’s much more complicated it doesn’t really
matter the program you’re connecting to for the most most it does matter obviously because we just mentioned that we had some problems with it but it can control more programs than any other approach we’re mentioning here just because the prevalence it’s in every program almost every program now let me and I don’t know if Connie is hearing but here’s the thing you see this button right here that it’s a fine button I’m marking it here on the top right that is the find Button as you can tell it’s not
simply a button is also a menu which probably has some items inside have some children so probably if you’re trying to access a child off that button what is going to happen is that probably the child does not exist unless you click on the small Arrow there so if you can click Joe on the little arrow there to the find you see this buttons here they don’t exist unless you click on the little thing so that’s what gets really tricky with UIA and ACC that they’re not really straightforward like even if you see the
button it didn’t create everything it’s just to save memory at some point so that makes it a little bit trickier because then that means that your approach has to click somewhere first before giving access to other parts of the program so to that brought up two things to say so it’s a really good point one was during the free call just yesterday morning we live stream on YouTube hopefully you guys watch that and someone mentioned when they minimize the GUI no ACC no longer UIA no longer works we’re like yeah that’s because you
basically destroy the windows and windows is saving memory and so that’s why it’s no longer there right the other one I’ve forgotten while you remember but the point is automating with UIA is stable that’s that’s the best it has that is really stable the only thing is that it’s tricky really tricky and it needs a lot of experience with programming so you have intuition about oh that button is not going to be there unless I click on it and I were my second point so which we also didn’t
discuss if you just categorize in general we think of two approaches there’s an API a programmatic way to do something then there’s the I’m going to imitate a human like the sending of the keystrokes and stuff that’s usually you’re you’re imitating a human unless you’re using control clicks and then it’s a little bit more like an API right well the UIA and ACC this is where it’s a little weird it’s in between you’re imitating a human but programmatically imitating a human if that makes any
sense so yeah you you can only do what’s in the GUI right right so with ap real apis usually there’s things that you can do whether there’s a GUI or not it doesn’t matter but with UIA programmatically interacting with the GUI which does come at a little bit of speed loss compared to a regular API that still is usually very fast right and highly reliable but just to keep that in mind which is what is Ace’s point was that’s why this menu doesn’t you have to click this first to bring this menu up with an API approach
you wouldn’t do that you could do something which is called the function directory which was like the menu select item there that’s really more of an API approach because you’re not triggering that menu to then go click the thing beneath it you’re programmatically hitting the target already without triggering the GUI right so that’s the difference sir and there’s nothing wrong with ACC compared to UIA it’s just that it’s deprecated and it’s been deprecated for a long time but the two libraries
the desk level has created they’re amazing and they’re still he said they’re out of alpha right yeah but that’s the thing it’s like you’re relying on someone else working on something and we pointed out an issue with one of the libraries and desclata looked at it and said yeah actually for this example he actually contacted Microsoft saying hey what’s going on with this thing anytime you’re relying on another Library it’s just you know hey if there’s something internal that
Autohotkey has directly instead of someone else’s you know implementation of it you’re kind of better off if you can use an internal API approach over using an external library right and just to remind you of the other point it’s not always only using one approach you’re using UIA whatever so it can happen in that these specific instance it’s better to send a keystroke or send a click a normal click which Connie had kind of like a loop and it was trying to double click on the item by doing a loop
sometimes it’s just better to get the position of the item and send click two and that is it it just clicks twice that’s it so at that point the methods all of this is not focus on one and use only that is hey know that there are different approaches and depending on the situation pick one over the other most of the times you will pick UIA for the whole program right but there are certain situations in which that’s not really the way to go just go and use something else that might be easier or might be you know working as
you need that’s it yeah the actually I’d added that the ACC and I believe creeper from as the UIA they often give you the coordinates the XY coordinates of what it is you’re inspecting and so if you can’t programmatically trigger it hey I can reliably without using OCR or some pixel images or image search yeah get that location and go send my my manual clip right which is it is kind of like you see how you can get the name or the value you can also get what is called the bounding rectangle and the bonding
rectangle is kind of like a square of the location where that control is at so yeah all right moving on the file now this actually part of it has to do with what is as much earlier about using the clipboard as a way to interact with with programs the file reading and object file object is kind of a similar thing if like sometimes you need to save data from other things then go read it and this and that we did I just want to mention here and it’s not a biggie but believe it’s the file open and file object right the file read and the
file object you can you used to have to use the code page right 65001 yeah yeah it was very well to those of us that are non-programmers it was very like what very geeky now you can put like utf-8 and it’ll set it that way so that’s just file read for if I read and file right you can do that okay now here’s the interesting thing as file read write fall in the same category as the clipboard most of the times I would prefer the file read write to the clipboard if the other program can read in the files
right so because that way I know that it is my file and no other program will touch that file because they don’t know about it so unless you have anything very specific that you have to do in the clipboard like for example setting the clipboard to HTML right so that you can paste HTML unless you don’t want to unless you really need that then I think usually if you need to share information between two programs just use a file read in lieu of clipboard sharing by the way I’m going to throw in a bonus one that we
didn’t an 18th approach because it’s kind of funny let me give you a quick background I’ll keep it short several years ago I had this list prepared and I asked Isaiah’s we had a call several years before that where I just got to meet him and then I asked him because I knew he was an expert I said hey he wasn’t working for me right I said hey I have these different approaches I’m just curious can you look at this list tell me if I’m missing anything right at the time I had the standard in out listed
and then we after actually from that call he started working for me like within the next day I think you went back I’d like to give my two weeks notice or like you know what it’s okay you can leave and so the next day he started working for me it was kind of wild because that wasn’t the plan anyway in generating this document we have add that state or not and we kept talking through it and going I can’t think of an example of how I would use that to automate a program however just the other day a couple
times that’s come up where we’re like you know like I’m automating ffmpeg and that’s one I need to get the various information for example you can read I think you can file read the input the the standard output so in the example with maestriath in studio he was running his scripts by using that as another input on like the object the shell object right execute AutoHotkey scripts without even creating a file it was right so there’s the bonus one not a lot of trading a lot of it maybe
somebody will get around to making some but it’s it’s it’s a complex topic yeah it’s it’s pretty cool that you can do that now as I mentioned earlier apis application programming interface right that is almost I’ll say the cream little creme right like it is it is the go-to if you can have if the program has an API which a lot of them do and they don’t we don’t realize it because we have a lot of hotkey right but oftentimes what were we talking about the other day is as we were helping
someone and I said oh there’s a commandlets sometimes it a PDF thing no and we use chargpt to try to get that right right I remember it was with shody with the power all right so it had some sort of its own API approach and we’re like hey you know maybe we can you know automate definitely I would definitely think a command line interface is a type of API is a programming approach for that program that you can call it from the command line with specific parameters and it just does whatever you asked to do so there’s a lot of programs
like for example most Microsoft programs have command line interfaces that you can send for example you want to open a Word document but convert it into something else you can open Word documents and then you put some parameters to change it so it when we are referring to programming specific apis I guess those also fall into that particular category you yeah and actually on that same call with shoddy we were talking about vote what was the name of his tool for the speech to yeah and it hears you and you know reacts to
what you say we were looking at the tool in itself takes the executable and then the word spoken as a parameter right and then and you automate off of it so it was doing that as well so obviously you know AutoHotkey it is amazingly easy to manipulate the registry now words of caution if you’re not a programmer you can kill your computer by if you mess with the registry right so it’s not something the funny stuff with it that then you will be wondering why the heck did I do that yeah you can’t boot and
yeah so back up your registry is that but it’s it’s super simple to find the paths and to update or to read it also to set things and it’s really just a text file so you have to understand how it’s structured and where to go the right Keys that’s another one chat GPT for another tool that we’re creating here it makes it really easy it’s pretty amazing all right so the status bar and this one again it it would have gotten the higher scores it’s just not as prevalent anymore compared
to what it used to be and it’s one of my first uses of Autohotkey I was using business objects and I could never tell when my query finished running it didn’t give me any real notification I’d have in the background but it didn’t make a noise didn’t flash didn’t do anything so I figured out how to read the status bar in the status bar it would say done but you know there was no notification so I just monitored that and then I would put up a big Flash and make it ding it was really easy but it’s a great way to to
be able to track a program if it has one now the status bar you can set values to it or you can get values to it but I think mostly in automation for other programs I think we’re we would use it mostly to gather information about the program really quickly which you know what there is which I think it falls on the controls you see the controls line that we were talking about for example you know that you can get the whole information out of a list view of any program so if it has a list you can get the whole thing it would be the same
with the status bar it falls into the same category of hey you can use the status bar control all the list views to gather information about the program that you’re automating without having to screen read or OCR or something like that it was one of my first real ahas that AutoHotkey is not just a super little library was with SPSS I just have this handy so I’m still going to pull it you can see you could easily detect what is selected you can detect all of the items in the list programmatically get
that you could even hide stuff and do stuff with controls and make them disabled or move them around and things like that was all crazy crazy powerful on those Aces point it’s just hey with the status bar whatever you’re programmatically getting that ripping it out doing what you want with it it’s not something that’s quirky and slow as long as it’s available it’s quite powerful you want to know what the user selected hey yeah just grab the information out of the list or so case in point back to the the thing
when I was using business objects I could select as many as I wanted to from a given list like I hear I can’t select more than one but I could select as many as I wanted to the problem was business objects only allowed you to do a query on 99 items and I’d be selecting and selecting and selecting I get past it but it never told me I was past it I didn’t know how far past it I was so I built the script so while I’m selecting and I would get to 99 it would tell me hey stop selecting you’re you’re maxed
out right and it saved me so much time but it’s just a silly thing but it was like wow that that really was was phenomenal for me right right okay COM objects who wants to guess what we rate this because it is it’s yeah we the reason why it’s not a 10 is you know it they’re a little Advanced and each com object is a little quite possibly a little different especially if you look at the Outlook object it’s it’s very expansive like it’s just wow it’s it’s it’s big a lot of time to invest
yeah yeah the way how I do it is that I just research what I want at that moment so I don’t learn the whole thing I just go ahead and say okay I’m going to use the COM object okay so I need to open think how do I open thing with a com object and I look for that oh and now how do I select this but then how do I select and I get that because I cannot read the whole object and get the whole information because it’s too much so I just learned it by parts that’s the only reason why we scored it just the title
over because for many people it doesn’t make sense to spend that much time on that on learning that if the only thing that you want to do is Select and make something bold well if that’s what you want just send Ctrl B because it’s going to bold your selected text so the trade-off between how useful it is for simple stuff and how good it is is too big I actually think I I love it for big projects for complicated projects but not for simple stuff yeah and yeah and that’s where I told Joe is too you know we put
together our objects course and he kept talking about classes obviously classes and I was really on classes and he kept bringing up com objects and I didn’t really get the connection and finally you know when you have a class all the methods and everything that’s what you have in your com object right and but I was telling these days I’ve been using com objects for years I never understood classes at all but in a com object it was just clear to me easier in the the syntax is easier to follow but
you can do crazy stuff with com objects without being a very Advanced programmer you don’t understand you have to understand classes because that’s basically handled for you you have to understand the you know getting a handle to it and connect to it but you can once you can look up the mail as Aus goes and looks on the msdn for the to understand and see what’s available I usually just go to stack Overflow and say how do I do this or it gives you an example right he’s reading all the you know advanced
they’re much more reliable and consistent having said that and honestly if it wasn’t for the oauth someday we’ll get our oauth figured out talk to where the handshake and have it standardized where everyone uses like at least at least have more than one use the same approach right it just seems like everyone makes up their own approach and you have to study and that takes me let’s say if I’m going to do a project and it’s going to take me 20 hours 15 of it will be figuring out the oauth
they’re like that’s the actual yeah the actual using of it is so simple it’s just a stupid oauth and that’s the authentication and stuff if they have oauth 1 available it’s usually really easy but that’s not as likely anymore it’s still prevalent but not as prevalent used to be you so you’re basically connecting the servers online and doing a query and returning usually almost always Json every once on XML or other structures as well even csvs you can but they’re amazing because if
you’re paying for given tools from a company they can have apis like even we did an example of the day with the translation to Google Translate or Google Maps or the YouTube API for extracting your subtitles I mean there’s so many things you can do with them they’re phenomenal and they’re really fast they’re very reliable and often free not always but usually free yeah all right the last one is just because it’s an interesting thing is sometimes you need to know information about your
computer and this WMI tasks it’s it’s amazing what data is available I mean is it actually is this you you talk to it I know you were talking earlier so this one is I I wish I knew more about it because I know the basics the basics is that the windows keeps kind of like a record a huge record of information about the computer almost anything you want to know think about it as the registry the registry keeps track of the state or settings of programs the win management instrumentation keeps track of the computer itself almost anything
you want to know about it is there now it is tricky not only because of the amount of information that is there it’s just how to get the information varies in certain situations you get structures you get certain weird things that are we are not used to but I do think again I I rate it lower just for the amount of time that it takes for you to learn the learning curve but when you’re automating stuff whenever you’re automating you very likely need information about many things on your computer especially the the data that
tells you about the current status of the computer and you could get that oh I need to automate printing I don’t know which printer is connected to my computer the Windows management instrumentation will tell you that right away how many monitors I have because I want to display or I want to move a window from a program from my main display to a different one well Windows management instrumentation tells you how many monitors where they are what are the sizes many other things that you can just query it give you values and then
you just do whatever you want so it is really useful in automating desktop applications the only thing is that it’s really a lot of information is a lot of things so yeah there’s a good example out there and I have it as a download so if you search the automator with there’s I’d say like 20 different scripts and each one of them gets different pieces now there’s this point there’s a lot more than what I have in the download right it’s and you can go investigate it but the ones I remember I think years and
years ago I asked a question in the Forum about getting unique and information about a given computer and through the wmi if I remember I was able to get the serial number from the motherboard exactly yes and it’s just the craziest stuff you can pull of all installed fonts or like just anything and everything you wanted to know about the computer like it’s it’s available that’s right I’m wondering if now I could I could get the current DPI scaling on this font Matrix from it to fix my programs
I could just grab that and let’s say what it is right hopefully that isn’t too overwhelming now let’s go ahead and open it up to more questions if anyone has on a specific thing of you know what you’re trying to do and do we wow you too much is that too much information yeah I think a lot of those things you guys knew about right so there’s a lot of little details that you guys knew about but there are some of them that I’m not really sure by the way so which ones do you which ones haven’t you ever heard about
I do think I overlooked the menu select item command in version one and I think I have something that that might help with so I’m gonna go or several things so I may well investigate that once I get an opportunity to go back to projects there’s a good Library out there there’s a couple playing with it but lexicos has one and it I told his ass we need to we need to update it because it’s so amazing it actually looks at the program for you and tells you all the options and he has it where you double click it
and it goes and triggers it so you can see very quickly if it’ll work but I told Isaias he should have it where you right click it and say write the syntax that will give me this the the V1 right exactly yeah just make it that much easier and don’t feel bad Noel because when Joe mentioned that to me I had been coding for 14 years and then he mentioned like wait here there’s this wind menu select and I was like what the heck are you talking about like what I didn’t know that yeah yeah well as I said before you know you
you learn something new if you pay attention and Avail yourself of you know the opportunity amen anybody else has any comments or questions yeah or we want to discuss using the certain one that you’ve tried and as a really quiet today what course should we use for com objects we do have one for Chrome objects on the automator that was objects in classes was it yeah yeah it’s it’s the classes the intro to classes or intro to objects right yeah and classes it the the caveat I want to say though is it doesn’t teach
you like Excel or word or Outlook it’s teaching you classes how to create your own coma objectives right basically right right okay and I have a ton of stuff on Excel and some on Outlook and a little bit on word and a little bit on PowerPoint videos the point is that it’s very different like if you’re going to use the mo by the way I’d say probably my guess is like 60 of Microsoft programs have a com object available at least the ones that most people use and and it’s phenomenal when it’s available even non and if you go to
calm the automator.com you’ll see a list of programs that I’ve outlined the more common programs that people use that have com objects so like even WinSCP is a program not by Microsoft but they have a com object SPSS has a com object so a lot of programs have common objects available to them but as we were saying earlier each one’s different what I would do is just Google stock for Google The Forum first and then stack Overflow would be the second one or chatbt which could probably give you the code nowadays to
to write it okay thank you one other question are you gonna is there a need to write or to produce new courses for v2 that you already have covered in V1 is there plans for that or should I just jump in with the V1 courses well we’re working on a intro to autohotkey nv2 there’s our you know V1 to V2 if you’re already a V1 user yeah we have one that helps you jump into V2 as you can imagine it’s going to take time to recreate our courses for V2 these things take you know a month or more to produce it’s not
like it’s a simple thing that’s a month of full-time work right for Isaias so it’s it’s not something we can just crank out we’re a small shop and we do client work and other stuff so yeah but it’s going to take time we are we are doing it so we are working with B2 in mind so soon we’re going to have a few things but yeah it’s still a work in progress basically completely understand answers my question I’ll go start with the V1 course well are you let me ask you this are you 100 new to autohotkey
or no I’ve been using Autohotkey for a long time but I’m not anywhere near you guys I’ve got elements in my scripts that I copied and pasted off the web I couldn’t I understand how they work but I couldn’t free type them fix it yeah exactly you know that kind of thing and then there’s things that I haven’t understood that I copy and paste like the I don’t know like calm or even the classes and all that kind of stuff that I need to take the courses on so I was wondering you know it was around the
corner I’d wait for the V2 version but if it’s not around the corner then I want to jump in on the V1 version and then just know that I have syntactical things not to observe necessarily in the V1 I’ve already got the V1 to V2 course okay so you know that’s very helpful and the converter which is very helpful so but I need the conceptual thing of the older course the good thing is the the objects the intro or do we call intermediate objects excuse me I think it was interesting because it’s a mid-level type thing
right but it’s still objects and classes are an advanced topic so that’s why it’s kind of it’s hard to summarize it clearly but in that course is actually talked about Maps em did you talk about fat air I don’t remember I don’t think no I did not talk about power Arrow but that one it didn’t come up and it was not needed for what we were doing yeah now the I would say do not buy the guise course because guise have changed so drastically compared to everything else guise are by far the biggest change
right with the V1 to V2 in the you look at them and they’re so different I would be like you know just wait for a V2 GUI’s course because I would feel criminal if you bought that course and then you learn it and then you look to go to V2 and you’re like oh my God it’s all they’re all really classes and objects right like it’s it’s so much to me cleaner and simpler you honestly could take the object’s course and then you could no gooeys far better than if you took our intro to GUIs course this is the
way I would look at it technically that’s right yeah well appreciate the guidance yeah I would love if I could clone his ass I would it’s we’re trying to balance creating new courses and you know still doing these live calls and and doing client work and everything else so yeah it’s tough no worries we were we were both very surprised that the V2 was officially launched in you know the amount of time it did yeah that was really fast that’s right I know you talk about the guy that doesn’t sleep
but I got you guys in that class too so thank you guys for being here I think that was an awesome call and whatever we need if you need if you had any questions just let us know in in the hero group and we’ll be more than happy to assist you yeah so again as a reminder for those who aren’t Heroes and watching this later we have a private telegram group that they can chime in at any time and ask questions and either we try to answer them or other hero members chime in and help answer people so it’s really
a fun collaborative group helping each other and so yeah we just have lots of fun and consider joining hope you enjoyed this chime in on questions if you have them I’ll have this as available as a download but let me get a little more update stuff into it but it’ll be available soon bye guys thanks everyone have a good weekend thanks
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 get the Deck Dimitri presented here, or just look through the below images.
1) All parameters are expressions, not text
2) Variables need to be declared
3) “All” commands are now also functions
4) Some functions now return objects
5) There is now a distinction between properties accessed with . and data (items, array or map elements) accessed with 
6) Hotkeys and non-autoreplace HotStrings are no longer labels; instead, they (automatically) define a function
7) All byRef variables need to have a “&” before
8) Function calls require a space or “(“. Use comma only between parameters
9) GUI and GUI controls are now objects
TLDR: The 62nd AutoHotkey webinar discussed the benefits and challenges of switching to version 2, which offers improved consistency and cleaner code, but may require code conversion and can be less forgiving for beginners.
1. 00:00 📢 The 62nd AutoHotkey webinar discussed podcast topics, demonstrated Quick Access Pop-up, and provided a code template for running AutoHotkey in a specific business with the Unicode version.
1.1 The 62nd AutoHotkey webinar had 112 registrants and participants were asked to ask questions in the chat instead of speaking due to the potential for confusion.
1.2 The speaker discussed various podcast topics including version two, increasing the likelihood of script running on multiple computers, and the pros and cons of subscription-based vs one-time fee sales.
1.3 The speaker shared their screen and demonstrated how to use Quick Access Pop-up with AutoHotkey in the 32-bit version.
1.4 The speaker provides a code template that can be downloaded to force AutoHotkey to run in a specific business with the Unicode version, which is a useful function that should be built into AutoHotkey.
2. 04:45 🚀 The new version of the cjson parser improves code consistency and speed, while the changes in autohotkey code may be less forgiving for beginners.
2.1 Geek dude’s new version of the cjson parser works in both 64-bit and 32-bit, and thanks to everyone who develops and runs the forum.
2.2 The speaker discussed the changes from version 1.1 to version 2 and provided examples of how to correctly convert code to avoid errors.
2.3 In the updated version, everything is a function and errors occur when a variable is not declared, resulting in better code and fewer commands.
2.4 The upgrade may improve consistency and speed, but benchmarking is needed to determine the extent of the improvements.
2.5 The changes in version two of autohotkey code are simpler and less arbitrary, but may be less forgiving and not as easy for beginners to learn.
2.6 The speaker thinks the new conversion process is great despite concerns, and is currently working on a converter that is improving but may have difficulty handling large changes.
3. 14:01 👨💻 Arrays, hotkeys, and objects behave differently in Autohotkey version 2, but it has improved consistency and nested functions.
3.1 Arrays behave differently in version one and version two, with brackets and points having different effects, and it’s important to understand these differences when working with arrays.
3.2 Fix hotkeys by adding brackets and use an ampersand before name to avoid errors.
3.3 Version 2 of the programming language requires a space instead of a comma for the first variable in commands, and the use of objects has been changed.
3.4 Autohotkey version 2 has improved consistency and nested functions, making it easier for editors to do their intellisense type stuff and allowing for special tools without interfering with the rest of the program.
3.5 Learning it was easy with just understanding the birth variables, and there were not many difficulties encountered.
4. 22:25 📝 The speaker discussed code conversion challenges and loop confusion, while also sharing their struggles with using Hit Up and making changes to improve their skills.
4.1 The speaker discussed adding an ampersand sign to the function declaration and clarified that loops are not functions.
4.2 The speaker created a converter to convert version one code to a new version, but loops as a function can be confusing and the converter is currently only for testing purposes.
4.3 The speaker discussed the challenges of converting code and the need to sometimes invent methods to achieve the same results, while acknowledging that there may be better ways to code and asking for a link to the converter.
4.4 The speaker struggled with using Hit Up, a coding script adopted from another person, and made changes to it before the original coder stopped helping, leading to the speaker working offline to improve their skills.
5. 28:24 👨💻 Switching to version two of AutoHotkey can avoid issues and the speaker is working on converting functions from version one to version two.
5.1 V2 began around 10-12 years ago and the error level variable in V2 produces the same result as the V1 goat.
5.2 Consider switching to version two to avoid the same issues Python faced when switching between versions two and three.
5.3 Many people still have thousands of Python 2 scripts written in legacy libraries and converting them to Python 3 can be a daunting task.
5.4 The speaker demonstrated how to run different versions of AutoHotkey using a small script that detects the version number in the first 20 lines of the file.
5.5 The speaker is working on converting functions from version one to version two, focusing on the most used ones, and believes that com objects should work the same regardless of the language used to connect to them.
6. 36:49 💻 Using AutoHotkey version 2 leads to cleaner and more consistent code, with a 64-bit installer for easier management of hotkeys and scripts.
6.1 Functions are preferred over commands in programming as they have a cleaner syntax and are easier to understand, and while the old way of dealing with double quotes in version one is no longer available in version two, single quotes can be used instead.
6.2 Using version two of the converter leads to more consistent and cleaner code in the long run.
6.3 When installing AutoHotkey version 2, it does not install version 1 and comes with a 64-bit installer, which allows for easier management of hotkeys and scripts.
6.4 Learning the syntax of a new coding language is important to be able to use the same rules in your code and make the transition easier.
6.5 Version one library for functions has two functions inside, and it is easy to transition without converting the whole code, but it is hard to differentiate between exchanges.
6.6 The speaker stumbled upon forum posts about hotkeys using vanilla and l versions while learning dot notation with auto hotkey.
7. 47:00 💻 AutoHotkey users should consider using separate sub-forums or tags to indicate the version being used, and a converter can help avoid problems when transitioning to version 2.
7.1 Use separate sub-forums or tags to indicate the version of AutoHotkey being used to avoid confusion, and consider using custom extensions for more interactive output.
7.2 Autohotkey version 2 has new functionality and changes that shouldn’t break version 1, but it may take a while for it to gain widespread popularity.
7.3 Language should be concise and consistent, although every language has its quirks.
7.4 A gradual move to version two would damage adoption and cause problems in the community, so a converter can be a great help for people to avoid that kind of mess.
7.5 Automating 80% of the work is helpful and efficient, as it saves time and effort.
8. 54:59 👨💻 It’s suggested to make a community-wide effort to switch to a new version of AutoHotkey to avoid supporting multiple languages, but it may be difficult due to the large amount of content that still works with the old version.
8.1 There are some improvements in AutoHotkey version 2, but there is no compelling reason for existing users to switch to it.
8.2 Users may not switch to AutoHotkey version 2 quickly as long as they can find examples of version 1 scripts in the community.
8.3 To avoid the challenge of supporting multiple languages, it is suggested that a community-wide effort should be made to switch to a new version as fast and hard as possible, although it may be difficult due to the large amount of content that still works with the old version.
8.4 The majority of code in the programming language Otaha is found in a select few places, such as Reddit and hockey forums, and efforts could be made to create a foolproof converter to update outdated code.
8.5 The speaker suggests using a tool to nudge developers to use version two and setting up rules to check for version one code in posts to reduce confusion and fragmentation in programming languages.
8.6 The speaker discusses the implementation of Lactico’s version of AutoHotkey and how it drove some people away, while also mentioning the debate between Lactico’s version and the previous version.
Summary for https://youtu.be/R-AJgevfZ3k by www.eightify.app