Transcription
Yeah, I've been dialing up all my IoT stuff. It's so fun. It's It's fun. Um, needs to be fun. It does. Okay, so um I Man, I lost my other screen that shows the participants, but um anyway, so so I'm Joe Glind. Um I'm here in Dallas, Texas. And hey, did you start your recording? You did. That's great. I did. Yep. Thank you though. Yeah. Um, obviously that's a Oh, and I see my reminder here. Um, got a good I got something full screen here and I can't get rid of it. All right, there we go. Um, and uh, yeah.
So, so I'm in Dallas, Texas, and uh, which is not nearly as cold as where Jackie is from. Jackie, what you Yeah, I'm from Denmark. I'm I'm just outside Copenhagen. So yeah, we we have way different weather from where you are, Joe, but still it's manageable. So So yeah. Yeah.
And uh and and Jackie and I, we we've been working together for a little bit over two years now, I think, of just talking about automating things with Auto Hotkey and share the same passions, run into the same issues. You know, now that I think about it, that's one of the other things I'd love to have a have a webinar on about how how how to best tackle trying to get others at work to either let you use auto hotkey or to to say, you know, like you've done, Jackie, we'll we'll demonstrate how to use it and we'll teach people and I call it the great things spy. They'll they'll go, "Wow, that's amazing. Oh, I'm so going to learn that." and then they never touch it, right? Yeah. But that would be, I think, a fun topic to to just discuss of how do we better quote unquote sell auto hotkey? Um, yeah, sure.
So, anyway, so, so we have uh we put together these webinars and and you start off, you know, everyone we had, let me see this next screen here. Oh, now that's interesting. Uh, I'll move this over here so we can see everything. So, right now we have 45 registrants. Obviously, no webinar ever gets the amount of registered, but that's why everybody starts off muted. It's not that Jackie and I are full of ourselves. Um, it's just that it would be mayhem if everyone was talking over each other. And so, for the first roughly hour where we go through a presentation that we put together, we will do the talking. If you have questions, raise your hand. Um, you can do that in in the the tool or you can ask it in chat. And usually one of us are monitoring chat pretty closely and we'll you know ask the question for you and then after the first hour we basically turn off well how do I phrase this right? We make it where you can unmute yourself if you want to ask a question and then it generally we we've had good luck of people not talking over each other. Um, but that's basically how we start out. Yeah. Yeah. It it seems to work just fine.
So, let's go ahead and get going here. So, the first thing, um, we we changed our format a little where we start off having a script highlight. And, um, I I tried this tool a couple years ago now called Lintal List, and it it was pretty robust and and granted, I think it's it's more still for noobs, but it's pretty powerful and easy to use. Um, and so I wanted to just do a couple demonstrations of using it here. So, I have it running and you can't see it, but let me do a screen capture real quick. So, in my this is my system tray and that little L there is the the icon for it shows it's running right now. Um, and I am going to bring over an email a blank email just to demonstrate. Let me get rid of that. Demonstrate um putting in it. Basically, think of it as as hotkey on crack, right? Um, so I have a hot the the built-in hotkey for it is the caps lock. And basically what you've done is you can pre, you know, put in your your text um, and items. And actually, you can do message boxes. You can have it interact with it. Um, I'm going to do a couple examples here where if I start typing, let me type insert. Insert. You can see it's filtering down on the things that have the word insert in it. And if I do this one, um, it it it will it depending on what it is. That was not the one I was thinking it was. Um, let me do HTML cuz I saw that one. Yeah. So, here's an HTML example. So, my name is Joe. And so, it it inserted, you know, HTML and rich text formatting, right, into my email. So if you had typically I use a lot of hot strings and I you know within auto hotkey of course it's just plain text but let's say you wanted to have it um with with bullets and whatnot. Uh let's list would allow you to even have images and everything right? So you could easily have um some hot strings and even hot keys. So I'll pull this back up and let me actually let me go back to here. Here you can see you can have a hot key um or you can type something short and it and what's interesting is I haven't quite thought through how I would use this but if I hit um enter it will insert this one. If I hit shift enter it will insert this text. And so e even for the same hot string or hot key I guess hot string I should say you can send different things depending on if you hit enter or shift enter um and this here's a couple links for you which we will share this deck um after the webinar we'll make it available online on our websites then send out links to it um but it's uh it's it's pretty robust and especially I think for noobs or people who don't program an auto hotkey it's a great tool to be able to set up to give to other people that allow them to have an easy interface where once you build it for them, right? They can they can uh easily have hot strings and and do lots of different ways and how they search and everything. It's it's pretty robust. It's a little too robust honestly for me. Um I wish there were something maybe there's an easy way to turn off some things, but it it's pretty slick. Jackie, I we haven't had a chance to chat. Have you used it? No, I've I've only seen it and and was intrigued by the idea he had. Of course, there's been more of these types of easy to interact with, but I seem to haven't gotten a notice job, whatever you would call that, that it seemed to be working quite well and and he has at least extended it for quite some time. So, yeah. Yeah. Yeah.
In the uh what I remember playing with it before because at one point I had a a need for the markdown stuff too which was interesting if if you're using a tool that has that need it um it can send stuff that way but yeah it was it it had a lot of flexibility um and was just a cool script that I thought I'd throw out there. Yeah, absolutely. And and it's nice to have these tools because yeah, more often than not, it's it's something like that that you can actually share with people that they would use. That's right. A lot of the time people are not really interested in learning to Right. As easy as it is. Yeah. It's still it it's um what's the right word for that? it it for the non- techucky person it they're a little afraid of doing two colons and then the letters right it's it's kind of funny but something like this can bridge it for people yeah yeah exactly so we just got a question about what it was written in and of course it's written in auto hotkey so yeah that's that's the idea of the script highlight that would most likely always be something written you know, auto hotkey. Yeah, absolutely. I I had there were a couple tools that I use that aren't auto hotkey that um I I had thought about at some point bringing up and and but to Jackie's point, right? I mean, the focus of these things are using auto, you know, automating and simplification and basically auto hotkey. So, yeah, I would everything that I would ever do would be on a hotkey. We might mention some of the other tools some other time, but wouldn't be a highlight. No, no, you're absolutely right. Go ahead. No. Yeah, I was just talking more to this Linds. It's always nice to to kind of bring up something that people have done some time ago and you might not be active on the forum and stuff. Yeah. You know, it's great to have some ideas, right? because so many things, you know, were created years ago and then they kind of get forgotten. Um, and if especially if you started like this last year, you it's just there's so much to learn and that know that's out there and that that's why I like kind of throwing up little gems that you know I've seen over the years and going, you know, I I this is a great tool for sharing. I I don't think of it too much for myself, but it's to allow me to share stuff with other people. Yeah. Yeah. Absolutely. And and I have at least seen people being who has been in the other hotkey community for let's say a few months or something like that and they have automated whatever they started with when they came and they kind of got hooked on writing out of hotkey stuff and and sometimes people simply run out of stuff to automate for themselves and they kind of grasp at stores to kind of get an idea of what they could do. And I see something like this as a great way to give people an insight to what other people has managed to actually do. Right.
All right, let's move on to the uh the topic of the day. Um and and so we have some bullets here just as the general advice. So this is first off just in troubleshooting in general, right? Um the first couple are are more just general advice of like man, you know, as I'm sure you've heard before, you know, annotate, annotate, annotate, add comments because I especially and maybe I I have a pathetic memory, but um I'll write some stuff and then a year or two later I'll come back to it and I have no idea what I was doing, right? um I don't recall what what the plan was and adding in some comments when you're actually writing your functions and you know what the things do can greatly ease um when you come back to it later or when some if someone else borrows yours or of course you borrow someone else's it it's very very helpful. Yeah, that's for sure. Especially when you're sharing it on the forum or something like that because Yeah. Yeah. the person you're actually sharing it with or doing it for or whatever might have a good idea of where you're going with stuff, but people coming in reading it later or if someone actually copies out and uses your snippet, if there's no comments in it when they copy it, they'll probably not add them in themselves. Sure. So it it kind of seeps uh or worse, Jackie, they will misinterpret what it does and they will add comments, but it actually, you know, cuz they didn't write it, they don't understand it. They might even incorrectly document it. Yeah. Yeah, that's also a possibility of course. Um the next one is just also good coding of do your best to to compartmentalize. I used to start off writing enorm and I shouldn't say enormously long because they weren't still weren't thousands of lines but I didn't create functions. I didn't create sub routines and it made trying to figure out where you are in your script and what's going on and and typically for this topic what's going wrong much more difficult. Yeah, absolutely. I I remember being there myself. Yeah. And the next one, um, depending on your skill level, right? I I I look at this, I wish I could do like a logarithmic scale because when you're new to this, hey, do yourself a favor and change one thing, you know, and like reload the script and test it, right? Don't make too many changes because when you start making a bunch of changes, it can be really confusing as far as to what actually broke your code. Yeah, absolutely. And especially if if you haven't comp I I can't say that right now but uh uh compartmentmentalize. Yeah. Okay. That's actually hard to say right now. But okay. If you haven't really chopped up your code in in nice readable uh sections and stuff like that, you will really quickly end up changing something that you can't refind because you're going down some kind of rabbit hole to actually find the bug. And if you just keep changing on the way there, yeah, you will have no idea of what you actually did that was the fix. Yeah. Um, but that's where also the more advanced you get, the, you know, unless you have a typo, the the the more changes you can make and you understand what's going on. Um, I I definitely don't do nearly as much testing every line for line as I used to, but um, I still do it more often than other people I know, and it it just, you know, it's it's not that hard to to pause and make sure what you did didn't kill something. Yeah. Yeah, that's for sure. And I'm reading some environment uh I'm sorry, some chat stuff of people talking about Yeah. they're how important it is to to comment stuff. Um, and yeah, it's it's the I love seeing finding stuff where people have document especially things like let's say a regular expression or an object in you know the things that I'm not that familiar with and I can get confused very easily and parsing it out can can really help in and adding comments. This next go ahead. Yeah, I'm I'm also I'm also reading what they're saying in the chat and and yeah, for sure people are talking about not doing so many inline comments maybe and and yeah, I must say that over time I've also done less and less inline comments, but that depends on how um I myself feel about the current code. If it's something I've written quite a lot of times and if it's for myself, I might not think about it at all and I might rewrite some comments if I'm sharing it publicly or something like that. But yeah, most of the time it might be a section header or something like that. What you know, that's actually that's a great point. Um, it doesn't have to be line by line explaining exactly what that line does. it can just be helping understand what the whole function does or the sub routine does or whatever that yeah yeah I I'd say that naming convention in your script generally naming your function something that makes sense or your variables and stuff like that right that also goes a long way it does um this next line and that's where if you're using like site or studio and some other stuff what I'll let's say I'm working on something and I'm not sure what I'm going to do what I typically do is I'll hit control D which duplicates it and then for me control Q I comment it out and this way I can play with this one and I have a backup right so I have especially like in a regular expression where I get close and then I'm like oh I just need this one more part to figure out and I don't do this and I screw up the thing so much that now I don't even have what I did have and so it it takes what that take a half a second to to basically make a backup up and then later I clean it all up and get rid of the other ones and hopefully annotate it, but not always. Um, no, we do it as much as we Yeah. can um
Okay, so now this next part here we get into when you're actually troubleshooting. Um, it similar to proof reading, right? If you're stuck on something, sometimes it really helps to to take either take a break. What I often do actually I'll go take a nap and I I take like 3 minute naps right to help understand that but um or switch to something else switch especially something outside of auto hotkey or coding your mind will take a break and when you come back it's easier to to look at it and see like oh man what was I thinking right that's that's the problem yeah yeah I I of course if I've worked on it a lot and I kind of just get stuck bumped or whatever and can't find it, I would also just walk away, do something else, whatever it might be, and maybe even sleep on it if it's late enough. Mhm. More often than that, I actually do what you have next. Well, which Yeah, which is a great one. I had read um but I I had read the bobblehead doll, but then I I was researching it and I found it of teddy bear or rubber duck. Basically, you have a inanimate object and you explain the issue that you're running into with to the inanimate object and and it has to be the other thing is it has to be out loud, right? If you do it out loud, your brain actually works a little differently and you often literally I don't know if it's well I shouldn't say literally, but you hear yourself and you go, "Oh, right. Um, of course it can't do that." You when it just makes you rethink it. this this next one. Um, and that's where so Jackie is far more advanced at programming than I am, right? And so what works really well though is like sometimes I'll get stuck and I'll I'll ask Jackie and often I'll I'll be explaining to him and I realize what's going on, right? Or cuz he's a better programmer, he can do he can spot the problem. But even vice versa, right? He can even though I'm not as good of a programmer as him, he can explain it to me. And one it goes back to that saying it out loud can help or because like when you're proofreading your own work, right? You will think there's a word there and it's not there, right? So no matter how good of a programmer you are, someone else can just ask you a question and you're like, well, what is that? Oh crap. Right. And you realize it's a typo, right? Or something like that. Yeah. Yeah. Exactly. I've and I see others in the comments as well also have used co-workers for it and that was also how I started doing the the bubble head doll kind of thing with even though they had absolutely no programming experience. I would still bring them over to the screen and and kind of line for line explain to them what what I wanted to happen there and jump around in the code following the flow and eventually I' I'd most likely end up actually finding the floor that way. This is where people with split personalities have a great advantage, right? talk to their other self coming back and seeing code they didn't even know they could write. Yeah. Or they'll use their dog as as someone someone put in their Yeah, that was a nice one, too. Yeah. Um
All right. So, so moving on. Um and then of course, you know, search search the auto hockey forum. Search that Stack Overflow because often other people have solved the the very thing you're doing. I wish there was a great way, which I'm sure all of you guys, you're geeky enough, right? To learn often if you don't even know what the problem is, it's hard to ask the question to find the problem, right? So, that's a tricky one of making sure you understand, you put in the right key words to help try to ex, you know, find the solution. Um, but but both of those are great places to look. And then, yeah, go ahead, Jackie. Yeah, I I I don't know. I I was kind of drawing something. I I can remember I think it came up just today where someone was asking about the what was it PWB or something that was a naming convention that was used in the beginning for comm objects as it is a pointed to web browser or something like that. And it it has lived for so long now and and people are starting to totally miss out on where it came from because they would just see it in code and try and use that for something special and it it's it's way off. Yeah. Yeah. It takes on its own life even Yeah, I got you. Um uh I I'm not going to try fairy van gagelder and I hope I'm close. Um I this is a great one. I should add this which I am a terrible typist, right? So I will literally try to copy and paste as much as I can because I have learned too painfully that um it's easy to I have dyslexia and to you know invert things and whatever. I mean, um, especi Thankfully, Auto Hockey is not case sensitive because when I was doing Python, that drove me nuts because I would uppercase and lowerase and not realize it. Uh, but yeah, copy and paste. That's that's a good tip to do that when you can. Absolutely.
Okay, so the next one, just to help people, especially noobs, right? Um, after when when you've searched and you can't find the solution you're looking for, um, posting questions to the forum, right? Here's just some general tips to help both you and the people on the forum because uh you know and Jackie is uh uh one of the admins on the forum and he answers a lot of questions and you see poorly written things right where people Oh, the IRC that's a good one too. Yeah. Um, but they will post questions but not explain at all. So I I outlined a couple bullets here of like one is do your best to isolate the issue. Um, give your example code. If there's data or variables or functions that you're using, make sure you include those. Explain the circumstances, you know, as in as much painful detail as you can to explain what's going on. Yeah, I I would actually like to add with give example code. I did at one point extract I think it was almost 30,000 topics about image image search. Yeah. Um, and I made some extractions of data from that and it actually showed a clear thing and that was if you had code in your question, you would get answers quickly and more precisely. Great point. So, so yeah, giving the code lets the person on the other end much easily figure out what you're actually struggling with because the code is just a little bit more universal and and how you explain it. So, yeah. Yeah. Um, and then you know it's it's very easy nowadays to take and I I have links here to to free programs to do each of these for screenshots or an animated GIF of what's happening or even a video. Um, those can help drastically because it, you know, when someone can literally see what happens, it it just changes everything. and then put in relevant information about you know what what version of AHK you're using if you're using 32 or 64bit of it of of it of Windows the different versions of Windows if you're using any sort of other software or hardware right listing the relevant information will help yeah because the relevant information can be a lot of different things simply depends on what you're trying to do right like saying uh I can't get my hotkey to work because uh it doesn't register when I when I click it and and then you can start uh questioning and okay so where are you trying to do it and more often than not they're trying to do it in let's say a game or Java application or something like that which just has some other rules and if you had provided that information right off the top the person asking might not have and and I I'm not sure if this is happening but I saw it happening at one point is that if someone steps into a topic and ask some questions that topic most likely will also be answered by the same person. And and if you end up having this person ask you some questions and you give some answers that the person cannot answer for you because it's way off or something they don't know anything about or something that doesn't interest them. You might have crippled your own chances of actually getting a useful answer. Yeah. Yeah. and your or it's not or it's it's in addition to I guess you are you're you're um you're making it more painful for both yourself and for the person on the on that's trying to help you. Yeah. The the other thing that I would do, by the way, the other thing I I would highly encourage is if you've never posted to the forum, which I I don't know if if any I'm going to assume every one of you have maybe, but um I spent I I used Auto Hotkey for probably two maybe three years before I ever once posted to the forum. I was just petrified of people realizing how bad I was, right? And then I realized, you know what? I mean, it I'm not that bad. Um, but what I would do is really isolate the in the issue that I'm seeing and if I had let's say I had a a thousand long line script and my I have isolated it where it's really these five lines but those five lines used variables from other parts of the the script instead of taking the entire script and posting it. What I would do is, you know, create hardcode the variable and the values that would get passed to that data. And that way the person that's helping me is isolated down to knowing exactly what, you know, what comes in and what it's trying to do. Um, it and sometimes it was just like I I'd have a web page that um that would uh couldn't be accessed by people in the forum as well or, you know, outside of my work. Yeah. Yeah, exactly. Because that is truly one of the things where having people post code is is one thing. Having people post a ton of code, so you actually need to use, let's say, a lot of time on figuring out. I I remember taking on some questions where people had just posted, let's say, 200 lines of auto recorded uh script. Yeah. Yeah. And figuring out what their issue was. They might have said that on line 57 because their editor might have line numbers, but you couldn't really see it on the forum. So, you had to copy out the code and look it over and kind of narrow it down because if they just had the same action 20 times, why not if you're already modifying the code? Yeah. But yeah, it's it's it's I'm I'm saying it can go both ways because some people like to narrow it down so much that you use lose the context. Agreed. Yeah. Yeah. That's what you have to really know what you're doing in order to if you're not sure what you're doing, put it all right. You're better off putting it all there, including make sure you include the other functions that uses or at least a link to where someone can get the function. But if you have a good idea what you're doing, trimming it down is I think nicer often. But some people do want to see the full thing. And that's where I'll use like a paste bin. You know, I'll post a link to the whole thing there and I'll try to isolate the small bit um on the forum. Yeah.
All right. Well, let's get into the the next slide here. um it is has some examples and and again we'll send out this deck um after this and it'll be available but um we I'm sure we've all used message boxes maybe even tool tips and pause right these are built-in commands that um for that can help with debugging checking the error level after something's done a lot of commands have an error level and if there's a one there then you know you can help understand it try catch and throw right can be very helpful in understanding you well especially you can stop if you do have something like on a website where the uh the element isn't always there right it's kind of like a if then way to deal with it and it won't break your script um and correct me if I'm wrong here Jackie but the throw like you can you can help diagnose is that right yeah that if it actually throws something you can you can use that yeah but I I'd say that try catch and throw I'm not sure I would really say that those are go to debacas. You can of course uh enclose stuff in those and you you can handle errors or uh missing elements or something like that, but to really debug it to remove it, that might be the the actual tool you use to re to handle whatever was going on. Yeah, fair enough. Um and then under so then there's and we're going to demonstrate a bunch of these in the next um on the next slide. We'll do some live coding. So list vares will show you all the value the variables and their values they have in them at the moment. Um list lines and list hotkeys and key history. These are all things will show you what's recently happened in your script. Um if you're playing with an object, this is one especially if you're new to playing with objects. I I used to spend a crapload of time where I would I would do something with an object. I thought I did. Let me restate that. And I would be trying to to look at the values of it and after like an hour, I would use this as object and realize the thing I'm looking at is not an object, right? I I did something wrong. Um, so that's my go-to now of like, is the stupid thing an object? Yes. Okay, then I'll start working on it. Um, and then when you're in a debugger, this output debug is is pretty can be helpful. And then here are a couple um these two functions which which I'll demonstrate at least one of them can be helpful for peeking inside of objects because um you can't just do a message box with an object um straight away of showing the the value um unless you you start writing some special stuff around it. Um there there are I'm not going to go into these, but this link will show you the different debugging clients that you can hook into Auto Hotkey and how and use. And then I'll we'll do a couple demos with HK Studio and site in the built-in debugging stuff which can be incredibly helpful and useful. It sure can. Yeah, I'd say that most of the time people that are fairly new can can get by with a lot of the tools at the top because I think they will handle most of it. But I'm pretty sure that if you get used to the debugging tools, those would immediately uh put you on the right path. Anyway, and having said that, nine, well, maybe it's eight out of 10 times, I still start off with a message box, right? Because the thing I'm working on, it's simple and I know where I am and it's just a very quick, easy way to to look at it. Um these are just all some other tools that that you can use um to to get to it. Yeah. Here here is also before we actually get into the the literal debugging um just just cuz uh you know it it often think we're in Windows, right? I'd say a, you know, when you start, first restart your script. Um, and the second one, if if you need to, you think it's a problem, restart the computer because we're in Windows and we all know Windows can be quirky, right? And there's nothing more painful than spending hours on end and finding out something just was acting weird when you start. Absolutely. Because again, restarting the script, that's that's one thing. It it depends on the error you get, of course. But if if it's just a script acting up or a hotkey that's not reacting or whatever and you you had it working, those are truly the the right place to start. And then if you are what testing newly written code that hasn't worked before, then I'd say two. Right. Gotcha. Um then you know start off with like a message box or list fairs. Um you can also which we'll demonstrate if you're new to auto hotkey of double clicking the icon gives you some access to some cool stuff that's really easy to get to. Here are some things just to make sure of like are you really sure paying attention to where the error is cuz sometimes it's not where you think it is. Um and that's I should allude that was alluding up to here too is don't just look at the exact line that the error you get. look a little bit before it and after it as well because sometimes let's say you forgot to close a quote on something or just whatever it it can right around the error message you get be affecting you know be the cause. Mhm. Another one that just will come up is, you know, you didn't realize you had already used that variable and you're using the same one again. And that can make you think there's something else going on and you can waste a lot of time understanding the difference between global and local scope and can often be just like you realized again you had the same variable but one was local and and it had a global whatnot. And then make making sure that you're not trying to do math on a string. um and and that the um the integer and the the level of decimals and things like that or it's an object you thought it was an object and it's not or um it is an object and you didn't realize it was it you know the function you did returned an object. Yeah, your sound is kind of going a little in out and up and down. I don't know what it is but just let you know. Yeah, but yeah, true that even though that auto hotkey helps you a lot with what you can do with what's in a variable as you don't normally need to take care of it's a string or if it's an integer and stuff. Sometimes if you start doing more involved stuff, you will need to have at least an idea of what you're working with. Calm as one way of looking at it and object is also because most of them will actually store stuff in our hotkey in a very specific way because it's actually set on the back end how our hotkey handles it. So it's the same when you are passing it to other uh interfaces that might be an online API or something like that. You might need to pass it as a specific format. So yeah, good idea to have a simple inkling of what you're actually.
All right. Now, I'm going to let me do a little screen capture here so I can um play with this. So now we're going to let's start off in site. Um so here is a a debug just a a script that really doesn't do anything. Uh but I'm going to demonstrate. So those of you who use site, let me save this. Now, this little bug button, right? Or I can hit F7 when I hit it. Oh, you know what? Let me No, let me exit out of it because I think it Yeah, if I've I apparently I have that running in studio. So, let me uh let me just close studio. That should take care of that. Yeah. Right now, I'm going to hit debug here. And this allows you to step into it. And you know what? Let me also I'm going to I'm going to display my variable list. So here are the um variables and notice like the global variables for dog and objects and test one to two ver they don't have any they they are registered and and Jackie you can help me understand that it it auto hockey will process the whole script but doesn't store it. Help me with that. No it it does store it. It's those there are of course stored at runtime so to speak but you can change it but it didn't it didn't set like the the you know the dog doesn't have a content right now. So see how dog right here is blank. And it's still I mean when it run when it runs through it and I guess that's the thing is but but what surprised me is when I start the debugger see these things I haven't even gotten to them yet and yet the debug knows that they're going to exist. Yeah, it's read all of the script and it's of course made variables so to speak but yeah you haven't assigned anything to them yet because you haven't run that line of code. So, of course, they can't have any kind of uh content. Mhm. That makes sense. So, as soon as you actually step into the debugging, they will start to get Yep. And so, here's boxer. Now, here's a um and I'm let me do the next one. There's boxer and hello. What what also is cool is let's say you were working on something this ver one, right? And you notice down here I have a outbook debug and it's going to show ver. But what's cool is in a debug this allows me under ver is I can doubleclick and I can say I can actually change the value of what's stored in that variable. And so if I'm doing debugger when I come down here and this is going to dump it into my output window in site it's going to show you the world is what's in there. Yeah. Um, and it's a nice tool. It is. It um, so here in the object you can double click and show the contents. So as we step through now we're going to jump into the function. Oh, and that was the other one I did was let's see right here. Now here we have a local ver and a global ver, right? Um, I'm sorry. Well, a variable named ver. Uh that's both there's one inside my function with a value and outside that's global. Yeah. And so this is just great ways to see what's going on. We can also I should have had it visible there because it would have shown you I was in a different um place. The call stack will help understand where you are in your script um and sub routine type things. Um and and then this output debug. I I love this in the sense because if you're not in debug mode, this will not do anything. It won't show yet. If I'm in debug and I run it and this next one, see how it sent world here? That's because I changed the value to be world, right? But this this will only show up if I'm in debug mode. It won't show up if I'm not in debug mode. So instead of adding and subtracting message boxes, I can just have um this code in here and change it. But unless I'm running in debug mode, it doesn't need to be there. Um exactly. The next one I just paused my script. Let me unpause it and keep going forward. Now here we're going to get into the list show of errors. So, where'd it go? I have a message box somewhere that you need to close. Ah, you're right. You are right. Oh, that's why cuz this Let me close that. Um, I forgot that, sir. So, now you have the list warf somewhere. Yeah, it must be on a It seems to be that one. There we go. Apparently. Yeah. So this um and it um it's going to show again for the objects. It doesn't show you the content, right? So what's what's nice is actually you can see now correct me if I'm wrong. That's the memory address, Jackie. Is that what that is? Yeah. Yeah, that that would also be my uh my take on that. That would be the memory address. Yeah. Um, but it's a it's a great easy way. And let me also um let me let me close I think I can close that now. Oh, I got to now show Well, I'll get back to that in a second here. And we can show hot keys. Where did the There it goes. Where'd it go? It shows the line it's actually executing, not the line that it just executed. Yeah. So, here are the hotkeys that are in the script. Mhm. I love that you use this browser forward key. You you like that one. I do. I use it a lot. And then the list lines are going to be the last um the last lines that were executed. Is that right? Yeah. Uh I right now I can't remember. I think it has the last 200 lines executed. Um, and of course if if you have a loop going, that might not be very useful because 200 lines of of the same loop will just repeat multiple times. So, but but other times it can be quite useful to see where you are if you're not in debugging mode. If the script has just stopped somewhere, this can be an easy way of looking and seeing, hey, where the what's hanging? What is it still waiting for a window or is it this loop just going indefinitely or is it waiting for something? Right? last lines can easily show you um in a quick way. Yeah. And then um this was just showing you the last keystrokes um the key history. So here was and here's notice the D um this is up down right. Yeah was down. I don't think I can zoom in. Someone was asking about I don't know if I don't think I can increase the font size on this. Um no most likely not. No. Yeah. But um but it notice it says t e s tt and that's because it's the down and up for each of those. And then the other one which I put in the deck here which I guess it's on this slide. Um these are hooks that you can increase or decrease the amount of data points that will hold for each of those things. By default, it doesn't actually keep a lot of the last keystrokes or mouse clicks, but you can you can play with that and change that if you want more. Yeah. Yeah, you can extend it.
All right. Now, let me let me and I I'll zoom in here, but I can't I don't think I can zoom in the other one. So, I'm going to exit out of this script and close this and I'm going to fire up studio and switch over to using it because it it has some really cool built-in stuff. Now, unfortunately, well, I don't know, however you say it. I I like menu buttons to do things, right? So, I made a button to launch debugger. If you don't have that, you hit alt m debug and de um debug current script. Right? So, that puts you into debug mode. And I'm going to say view the view the variable browser. Um and now as I step into it, I can either hit alt e or step into it. And this will start. It works in a lot of ways very similar to what I was showing you. But what I really like is like here I can automatically show you what are in the objects without going through all those tedious things, right, that I did in site. Um, and I can double click and update them and do whatever I want. Yeah, I would say that if I think that maybe Yeah, that's great. It's good. And the one that made it for Sadi, he probably just had another mindset with with kind of putting it in another place. But yeah, it it it's always been nice that these debuggers allows you to actually view what's in the objects because more often than not, you will happen to have something in there that might be in the wrong place or you have named it something differently or you have more depth in your object than you actually thought you had or something. And Jackie, yeah, that's what actually what I was going to say was when I first saw this and how easy it was to see my object, how it's laid out, I'm like, you know what? Even if I'm not de quote unquote debugging, just because I am not very familiar with objects, to be able to have a literal diagram of how the object is built is is really helpful for me. And so I I really liked that that it was that easy to see it. The other one in site and studio both do is after you've gone over one you can mouse over and see how here if I mouse over the variable dog a a tool tip comes up and shows me it's a global variable and that it's has the content of boxer.
So that I think that's pretty cool too. Of I can mouse over anywhere in the script and it'll tell you if you know, if the variable has something, um, the contents of it at that point in time. Yeah. Yeah. So if if if war hadn't been filled with hellos yet, you wouldn't see that there, right? And I think on on I think there we go. Let's see. Hello, I'll say world two. And now hopefully. Yeah, it's it's dynamic. I I would have thought so as well. So that's that's good. Yeah, it um it it's that's pretty powerful to see.
So, I'm looking at my notes of what I wanted to make sure that I covered. Um, but doesn't doesn't that actually work within it already or or how is that? No, that doesn't. Which part? The mouse over? Yeah. I'm just thinking that can't really work without the debugging going. Right. Right. No, I No, I don't think it does. Right. You has to have processed it and yeah. Um, the the other oh, the other one I just want to demonstrate just in case you haven't, um, you know, done this and it's not really in the debugger. Let me get rid of the debug mode. But let's say I wanted to know, we we have a question about explaining the differences between set and studio. I don't know if you have any words on that. Um, in one second, let me finish up this, then I'll I'll do my best. So, this is how I typically use the isobject function, right? And and here's my run button. Yeah, hopefully that'll work. All right. Why didn't that launch? Could not close the previous instance of the script. Something is probably I guess cuz let me let me stop here and I think I can hit this run button. There we go. So this one, this is saying if this was not an object, it would this message box would return to zero. Yeah, it's returning true for it being so that is one man if you're used not used to using objects. Um, I that's my go-to the first time if I'm doing anything and I think it's an object. I just test that real quickly cuz it it's one of those you'll kill yourself later if you realize like, oh, I it, you know, it just wasn't an object and that whole time you wasted. Yeah.
So, so as for site and studio, so so Jackie and I both when we we started talking years ago, we were both loved to use on site. Um, I use different I've really customized mine and and Jackie doesn't. Um, and I still I use site a lot because I also use SQL and HTML and sometimes Python and other languages. Um, Auto Hotkey Studio was built solely for Auto Hotkey and it's actually built in Auto Hotkey. Um, and so site I have I think around 80 different uh IntelliSense programming you know languages that that can show the the color coding and and help with stuff. Um, but auto hotkey studio is built by Maith is is very robust but it's built only for auto hotkey. Um, and and I went I have like a a two-hour video I think where uh Maith walked me through. I kept throwing at him everything I really loved about site and virtually everything that I loved about it was in studio and we actually had a demo if you see what was that I think our first webinar Jackie if I remember right? Yeah, it might be. Yeah, was talking about studio. So we have a good video on that. Um, I it's maj himself who's Yeah. Let it. Yeah. Yeah. And and and he's also happy to um if you find something that you really like that isn't in there, you know, he'll review it and possibly add it if it, you know, if it makes sense. U but it it's they're both great programs. Um, yeah, and they're both free. Um, yeah, and Notepad++ is another one. I didn't feature it here because I don't use it, but I know it has debug stuff built in, you know, that you can use. Yeah, I I I'm pretty sure that Note Plus+ is actually used by quite a few people. Yeah, I'm I'm sure people use quite a lot of different editing tools, but I think set might be the one next after normal notepad that is used by most that that'd be my guess. Yeah. Yeah. If you come to this link which is from that web page, um I believe. Yeah. Here's a a DBGP plugin for Notepad++ in using for troubleshooting. um for debugging. Yeah. Yeah. It's and I um I think everyone agrees that like it's it's more of what you like. There's no like holy cow this is I mean Studio has a lot of great stuff once you get used to it of automatically, you know, closing thing quotes for you and parenthesis and wrapping and um but it it takes some getting used to. Um, Ian, yeah, I'd say that had I started using studio first, I would probably still be using studio now. But as I actually started using said first, that's that's just the one I go to and the one when I install a hotkey on a new computer, I actually get set as well. and and that's just force of habit maybe because I am using so little of the functionality in the actual editor. Um, I'd say what I'm using most is the coloring of the code. And next after that, maybe a little insight to which parameters goes where when it's a command. I don't use normally or something like that. But other than that, I don't really use any of the stuff that it actually provides. And that's that's just me. But that also means that I have no real reason to switch or to not switch, right? But yeah, uh I just remembered I wanted to demonstrate at least one of these functions. So this dmp I think it's like dump. Um, so if you have an object actually even if you have multiple objects, you can put them in like this and when you run it, it will show you the, you know, how this is actually like how they're accessed and their values. Um, one caveat I got to note is I didn't realize it, but there's some sort of a string limit on this. And there was one time where I was beating my head against the wall of like what I was doing wrong returning something and it just had to do with the the value that was in the stored in a variable was really long and for whatever reason that this function was breaking on it. Um, I don't know this next one. I think it works the same way. in the sense of when I Let me run it. Oh, that's right. I'm sorry. This one. Come on. There we go. So, this one you it doesn't have a built-in display. Um, so it will show you straight up what's what's in there. I don't think I can have multiple, though. Um, and I haven't I don't know if this one has that same hindrance with the the length of the values. Um, but I not being a programmer and not using objects a lot, um, found it really helpful to to have I use this one a lot to just kind of peek inside. But now that I saw that in the debug I can really easily see what's in the layout, um, I'm all about using that. Yeah. Yeah, absolutely. Again, it's it's nice to have it accessible through code, and that's also useful for different things, but for you as a debugging tool, the the interface that's built over there might be just what you need. Mhm. Together with actually stepping through the code. Yeah. And and I think it gets back to when we talk about debugging. It is there's one is we're showing you how to use a debugger with with auto hotkey, but you know that is you know when you're actually anyway I guess where I'm trying to get to it is it's not just using that right it's your whole overall methodology and how you go about building your code and annotating and all this stuff. It's all related into spending less time trying to figure out what isn't working. and you know have better looking code and then have find ways to diagnose what's going on. Yeah, absolutely.
All right, I'm going to um unless anyone real quickly has questions, but I was going to stop the recording and then we'll start it back up again and unmute everybody. Um, and then we'll see if anyone has.