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

AutoHotkey Webinar- Various ways to use AHK to automate tasks in Windows

In the first hour of our March AutoHotkey webinar we covered core concepts of what to consider when writing a script.AutoHotkey webinar

The second hour we took a deeper dive into coding using some of the methods mentioned in hour one.

Script highlight:  Copy Explorer path to clipboard

Things to Consider when writing a NEW script

  1. Are you behind a time-crunch to get the job done?
  2. Are you looking for a 1-time solution?
    1. What are the odds that you could re-purpose your solution for something else at a later date?
  3. Will this be run on multiple:
    1. Computers
    2. Windows versions
    3. Users
    4. What software is also running on computers
    5. Bitness (32 & 64) of OS, AutoHotkey , program interacting with
  4. Is there existing code that you can borrow / steal / leverage?
    1. Previous code I’ve written
    2. Sites like:  AHK Forum  Stack Overflow  Reddit  Github  the-Automator  JSZApp  Jack Dunning Blog
    3. Ask colleagues / friends / Social channels
      1. AHK Forum   StackOverflow    Reddit
      2. LinkedIn 1  LinkedIn 2
      3. Facebook 1  Facebook2  Facebook 3
      4. Joe Glines  Jackie Sztuk  Hellbent  ahkTuts AboutScript  Chunjee  AHK vids
  5. Will someone other than you be using / maintain the code? Program to their “level”

Many ways to “Control / Interact” Window’s programs

Example Scripts used during Coding demonstration of AutoHotkey webinar

  • WinDump (Note: I forgot to demo this tool during webinar but it is pretty nice.)

Links time-stamped to recording

0:00:00 okay so unfortunately my colleague that presents with me Jackie he he is not feeling well he’s under the weather he is in bed so he is not gonna make it today so I’m I still got both of our info here but he’s he’s not going to tend so I’m gonna be doing all the tour it’s talking for us first Ian and so this is our our contact info here’s our websites and email addresses this is you know we’re not trying to drive business to us but we do have resources around on a hotkey on our sites so check those out if you get a chance and just to clear up so we had 36 people register typically about half that register show up everyone and because we have that many people that’s why you start off muted right because

0:00:49 otherwise everyone would be talking over once each other and it just gets very confusing after the initial and I think we’ll probably because I was planning on Jackie doing more of the programming and this one so I don’t think we’ll make it the full hour before I unmute or at least change where you can unmute yourself but when you do try to be nice you know raise you can and meanwhile raise your he end on you’ll see a button somewhere where you can raise your hand because I’m on my own it’s gonna be a little harder for me to notice that or if you pop in the chat I think I’m a little more likely to see that I’m I’m trying to figure out where I actually see the hand raised I know I’ve seen it but I’m yeah I’ll try and follow do my

0:01:27 best to follow the thread so maybe I just saw your Jackie’s sick he um he was sent home from work this morning and then he emailed me earlier and just basically said he is just he’s not gonna make it um so it’s unfortunate and I see Jon’s up in Portland awesome so anyway so we asked the question in chat I’ll do my best to monitor it and then we’ll get going here so so the first we start off with a script highlighter and this one to me it’s not even really a script I have it as it’s part in my main script what it does and here’s just a screen shot I took where you can if I’m an explorer and I can highlight a file and I can in my script I hit ctrl shift C let me go ahead and bring over the the scripture so you can see it that’s

0:02:21 pretty short and so I say basically and I added that you wouldn’t need this right if it’s in your main script probably you probably already have that but if the Explorer class is what’s highlighted you know the active window when I hit control shift see what it’s going to do is this first part is it blanks out your clipboard and then it sends ctrl C and here it just waits and make sure that something gets there if it doesn’t if nothing is found it’ll give you a warning saying hey actually nothing showed up in the clipboard after that it takes the clipboard in this if I remember I kind of strips the format in and gets rid of some of the other stuff and then these I did because when I when I was working a large company I was making this for other people that I had

0:03:09 also mapped drives and I had my Dropbox that you know when I’m copying the path and I’m gonna do something else with it like I want to share it I wanted to be able to have the full path not the path because what I do is I make a it’s kind of like a network drive I create a fake drives my B Drive which is actually under this folder it’s my Dropbox Drive and so it’ll swap this out when it does it and so let me demonstrate this real quickly here so I can highlight any file and when I’m in Explorer let me actually pick a file instead of a shortcut when I hit ctrl shift C now when I paste it of course didn’t work oh I closed the script sorry and I close out of my main one so I would be using just this one so now I launched it alright any luck this will

0:03:57 actually work so ctrl shift C and when I paste oh and it also wraps it in quotes because the programs I often use they need quotes autohotkey if you’re gonna dump in the path it doesn’t need quotes and so that is one thing I I had thought about doing that a fine insight to strip off the quotes because typically if I’m in sites that means I’m more than likely programming out a hotkey and I don’t need the quotes around the path I haven’t taken it to that level yet but this is a super easy script what here I have a do is it looks at the user of the computer right which profile it’s under and depending on which profile it is on my home computer I’m Joe at work this was my my username and it’ll just do a quick search replace but that’s it it’s very helpful the other thing I’ll

0:04:44 do a lot is because I work out of Explorer a lot I’ll be an explorer and I want to open this in a different type of program right and what’s nice is I can be here and let’s say I open up and I don’t know how powerpoints gonna do with this but I can hit ctrl o here and I can just paste the path and hit open that’s interesting that sure looks like that’s the path but anyway it’ll pop open and virtually any program so and I’ll have this available we also this this deck that I’m reviewing we will send out after the webinar and will be available on our websites also as our by the way the past webinars that we have recorded in all the resources alright so moving on the this topic of our webinar I should have had a thing saying here but it’s it’s kind of

0:05:47 basically at the end of our last webinar we had a a user Brad asked a question about he wanted some help on the script he was working on and he had written me before on the side and I had seen what he was doing and he what he had done I don’t think I have it right in front of me but he had it where he would have a text file and what he wanted to do is to use the search replace I think he was using notepad plus plus and he was using the search replace and so he was literally sending keystrokes to say a ctrl H and then you know I think he had a select all here paste in some text tab to the next one put in the text you wanna replace and then run it and then manually go through and do that I had in it anyway so that God is talking about different ways to do it and what

0:06:40 we realize was like this is a great topic for us to talk about as like there are there are you know a hundred and ten ways to skin a cat and there’s never the right way or wrong way it depends of course on a lot of variables and so the topic of this webinar is to kind of bring up different approaches that you can use especially there’s some we’re gonna highlight I’m not gonna go into programming in them but we’re gonna highlight how they how they actually exists and then we can discuss the pluses and minuses of each one meanwhile here here are the things that I wrote down and I’d love anybody to add in the chat things that you also take into account before I start writing a script right this is I kind of brainstormed on the thought process I go through right

0:07:24 the first one is do you need something that you need to get done in the next ten minutes right and it’s still gonna save you time if you can automate send you know clicking a key button right over and over write that that right there like sometimes that comes up and you know what I’m lazy enough where I’m just gonna send hitting tab tab enter tab tab enter and and just do it and get it done if that’s not the case is it still possibly a one-time solution are you ever gonna reuse it again and even if you’re not going to necessarily use that again this is the other one that’s really when I first started programming in autohotkey I am I used to think oh I’ll just I’ll go write a script for this in or I wouldn’t write a script I would manually do something and later I

0:08:09 would realize I could repurpose over and over and over so much of what I did before right and thankfully I have a somewhat decent memory where I can remember where I did something I can go find it my scripts but this is such a critical thing what I realized was a lot of the problems I solve I end up repurposing my code in other scripts later and so it really gets me to rethink this first one even if I’m not gonna even if I’m just gonna use this solution this one time is the general approach that I’m solving for something I could use in a lot of different you know scripts later on because it it makes you take a step back and say hey I’m not gonna just do something here and send keystrokes that’s gonna be done in ten minutes I

0:08:53 made me think is have a little more over robust other things to consider are you know is it going to be on multiple computers is that running just on this machine is there gonna run on multiple machines I have do they have the same operating system here’s a big one if you have if you’re gonna share your code with other users right that that makes a difference to not just because of their computers being different and the let’s say browsers or something that you’re gonna have them automate and different Windows versions but just how they think right in in trying to make something that is easily easy to use for other people and intuitive to them is you got to put on your thinking cap and realize not everybody thinks the same way you do and then this one is a critical one as

0:09:41 well of which I was alluding to up here is if you’re gonna be running out on Windows 10 and Windows 7 or possibly XP or if you’re gonna connect with this morning I was working or something and I I forgot that the program I was connected to was 64-bit and ie run on 32-bit version of autohotkey typically and so these things you have to consider when you’re building your program and and how much time you’re gonna invest into it and what you’re gonna do then my next step is to start thinking about hey where I don’t want to reinvent the wheel right is there somewhere I mean I used to feel guilty about this of borrowing code from other people and stealing it you know but honestly the more I learned about programming the more I realize to virtually nobody starts from scratch

0:10:28 right they go out and borrow what they can from anywhere and everywhere you know if you’re good about it you’ll cite that you borrowed something from somewhere but it’s very I think it’s not that common where people just always write everything themselves unless it’s a super tiny little bit right and then of course all right if I’m going to start looking for code where do I go well the first off just because it’s it’s easy for me I search my own computer search that yeah or I just can remember oh I’ve done something like that on this script and I go find it the next step I do is I will go to the my first stop is always the autohotkey for max stackoverflow what I do I have a this hotkey where I can hit caps s and let’s

0:11:14 say control gap because that’s going to be one here I think we focus on and it will run it launch them the other window here it it runs a Google search both on Stack Overflow and on autohotkey and so I leverage Google search but I search those two forum sites and it’s just a quick easy way for me to see if there’s something already out there and that’s why I wrote this hotkey cuz I do it a lot right and and I used to have MSDN and a couple other sites but I realized by far these are my two go twos right when I’m in the search for something the the reddit forum has quite a bit of stuff as well github is is much more when you’re looking for libraries often they’ll be there the good thing about that this is typically on the forum they’ll be mentions of the stuff in

0:12:07 github which is why I don’t necessarily search there but often you’ll find good stuff there again just to put them out there there’s Jackie mi sites I have much more of videos tutorials and teaching how to do stuff it’s not that I have a big plethora of script itself it’s I want to help people learn in Jackie’s doing the same thing and then Jack darling Dunning this blog is is more on entry-level stuff I think generally speaking and but it’s it’s it’s great for noobs I think especially with hot keys and hot strings and things alright after if I can’t find anything within I usually spend about ten minutes right looking depending of course how complex the thing is but then I will reach out right so these these you can do on your

0:12:55 own without bugging anybody and this one here is where we’re being active and so I you can post a for a question to the forum obviously do a little bit of research first figure out what the best forum thread is to post it on but the between the forum Stack Overflow and reddit those are three great places where people are very active and typically especially if the question you’re trying to solve is a quick question as pretty easy I will use either Stack Overflow or reddit yeah those to the forum works too but let’s put it this way if I had a very complex question I would not put it on reddit or Stack Overflow I think all three are great for short and easy questions but sometimes I think Stack Overflow and ready you know I should

0:13:48 have put the I our visit IRC I think channel I don’t use it but I know there’s people often on it and those are people who are live and that’s what’s really helpful is being able to dynamically ask people questions right and that’s what that’s why I listed this is actually I guess I should have this as another bullet but it’s I I will first reach out to Jackie and a few other people and say hey have you ever you know solved this problem because again if they’ve gone through that process of trying to achieve X and they say I trust them as being you know good programmers have figured out here’s a good approach why would I go through and look at all these different ways when someone else is solved it right and so often they will have or they can say no

0:14:35 I haven’t but I think I think I saw something on the forum here right or just sometimes I’m not searching in the right way or they’ll know if it’s not even possible after that there are there’s a couple LinkedIn groups in several Facebook groups that you can I will see some people post questions there they’re not nearly as active as the these first three but they’re definitely there and then there’s a lot of other resources you know now that I look at it I think these I should probably put up here with the sites I guess I put them in there because it’s social channels but I I have I think at least 150 videos on autohotkey Jackie has several held that what’s actually you know it and I need to change us the link is in here but if it’s ciz reborn i

0:15:26 think is his youtube name actually if i let me see if I can [Music] now of course not why would you have the name anyway he does a lot of great stuff especially with gooeys which I’ve been learning a lot about lately and then these are other good channels that have some good stuff without a hotkey and learning how to do things then I sing with videos of course is that this it’s a little bit easier to follow sometimes and watch exactly what someone does when they run code because things on the forum people will post but it’s hard you know then they’ll update something later but you you don’t get the whole picture at one time and so YouTube I think it’s a great way to look it’s great way to learn how to do things

0:16:09 it’s not necessarily going to solve you know the example you have right in that case but it’s more of a learning thing you’re trying to learn an approach and then this last one is something to consider is is are you helping out so like in the case with Brad um so he had asked a question and I wrote a response and I purposely didn’t put things too complicated just because from talking to him I could tell he wasn’t you know at like LexA Coast level of programming right and so I’ll look at stuff in the forum and it’s like Steph I’ll see jackie has done years ago and he will do stuff with calm and and internet explorer in how it’s navigating over links and doing and looping things or makes it it’s very complicated doing it I mean to me it is in objects and I’m

0:17:01 like that’s it makes it harder for me to solve I mean that’s great when what they’re offering actually gives a better solution it makes it nice or and tighter then it I think it still makes sense but when you do that just to simplify a looping command and then someone doesn’t understand what you’re doing there with a while statement and doing this it can confuse people right so just consider who’s gonna be using it who’s gonna maintain the code also if you are helping someone if you make it to high level they’re gonna keep remembering to keep coming back to you probably just to offer up help in fixing it later so these are the general processes that I go through in deciding how much time I must spend on writing my code what approach I’m going to use

0:17:47 and then I didn’t you know I should have put a slide in here that’s how I decide on the the different approaches actually this one this one’s close enough because there are a lot of different ways to interact with Windows Oh before I go on actually if anyone on chat does anyone else have anything to mention in here of what they use to consider did I did I miss anything I’ll take that as a No or that my chats frozen let me see this real quick okay thank you for a second there I thought I was just talking to nobody and you guys were watching me babble cool awesome thank you all right so this is one of those things it was actually kind of funny cuz over the weekend I was I was trying to automate things in tableau in tableau as a visualization tool that’s that’s all the

0:18:59 rage now it does a lot of cool stuff but what’s crazy is their lack of hotkeys for doing things and so I had to think of different ways to automate what I was doing and of course we all I think almost everyone probably you know unless you’re an actual programmer you start off an autohotkey you know using either a hot strings or sending keystrokes right or mouse clicks right I think it’s a it’s a common very simple easy way to to learn stuff without a hotkey in it and you know what often it works right it may not work every time but it works a high-enough percent of the time that you don’t care and which is fine there’s nothing wrong with that it’s just for my experience depending on what you’re doing especially when you start doing stuff on you work on different computers

0:19:45 or you’re giving your code to someone else that’s when the sending of the keystrokes and mouse clicks because you have different resolutions and in different other configurations or other programs that people run that you’re not running you end up with having a lot more issues when you factor those things in and that that goes back to the previous slide right that’s why this little bit of understanding who’s gonna be running it and what software also will be running at the time actually I should add that in there I’ll go tidy but that is another consideration right to take into account of is it going to conflict with anything and the other ones so so anyway so when I realized in tableau is also tableau does not have from what I can

0:20:37 tell a calm interface to connect other programs now later we’re gonna touch on some of these things I’m not diving into calm because if you haven’t seen that we have a webinar talking about using calm and why you should use calm and how great it is unfortunately of course not all programs have the calm interface and so in this case where I was just describing and tableau I couldn’t connect with it viacom but there are other things here like sending interacting with Windows controls send me sending or post messages and you can look at the events and use shell hooks to see on on some windows I’m sorry on some programs literal windows of the programs you can interact and understand in C and trigger events in clicks and read the screen then there’s there’s

0:21:28 actually if you’re the program you’re acting with is an older program autohotkey has a built-in menu selection thing where you can send items like it’s it’s basically like a notepad hitting alt fo4 open right but it’s actually sending the the commands to it not hitting keystrokes so again it’s just if it works it’s more real it’s gonna be more reliable and then clipboard manipulation right which what that was what in brad script we were talking it through and and he was piecemealing the search replace on the text which is fine it was working for him so hey you know what that works but during the webinar Jackie’s I hate why don’t you send control all and then copy it and then do all the search replacing the clipboard instead of

0:22:18 sending the keystrokes right which which is going to be a lot lot faster to be incredibly faster and not just that though it’ll be it will be on average more reliable right because you’re doing it all a memory and there is no oh I missed a tab or you know something happened something interacted or I hit a button or anything and then for my solution on that example where I had written back to him when I realized he was reading a file and that file was a template that never changed it was always in the same location right to me I’m like well wow man I wouldn’t I wouldn’t do anything from inside the program I would just read that path and then basically manipulate the text instead of from the clipboard right but I’m gonna manipulate the text as an

0:23:00 object and do search for place on it and then write it back using file append or this is where if you’re doing a lot of opening let me rephrase that if you’re doing a lot of writing reading or writing to the file a file object is I gotta say it’s at least a hundred if not a thousand times faster if you don’t notice it on small stuff but when you start doing a lot with the file that you’re reading and writing to it it makes an enormous speed difference by using the file object where you open the file once you do search for place or do whatever read/write to that file object and it stays open and then you close at one time and it’s not accessing your disk left and right every time there’s this other I just called the existed the out the ACC viewer because I don’t even

0:23:52 want to say accessibility every time um I have the links here and again we’ll send this deck out but the the viewer in this library which gives you a whole different way to connect to programs this on here’s a bit of a conundrum this technology from what I read from I think Jethro was writing a lot about it has been superseded by this you I you I automation interface so this is actually like the newer latest and greatest version of what this did I mean maybe that’s not technically correct but over all it’s a I think a decent summary the problem is this this one I have an example script where I’ll show you where we can get text from virtually any window but there’s not oh there’s not this viewer that makes it easy to go look at stuff there’s not a big library

0:24:41 behind it not a hotkey and so this one I think for now is still like hey you know what it’s viable and it works I can I can work on it pretty easily versus this is the the future but we just don’t have a great library for it yet and then the whole calm which I mentioned earlier is a great way to programmatically think of this like VBA to connect to an open program right and instead of like in Excel let’s say instead of sending keystrokes to Excel and sending ctrl V to paste as you know something in a spot you’re you’re pretending like you’re just doing it VBA right you’re programmatically interacting with it the cell cells and doing whatever you want and it’s it’s incredibly fast and reliable and customizable again it’s it’s more

0:25:24 complex right in the sense of you need to understand something about dot notation and opening a comm connection to the object but it is highly highly reliable you know and when you share it with other people it is much more likely to work correctly similarly the other thing I love about doing stuff without a hotkey with that is a lot of people will do they’ll write a macro and VBA and keep it in Excel but then when you try to share your VBA macro it’ll get caught up in spam filters or the person that opens it doesn’t realize they need to accept and say it’s ok that this has a macro in it and use the macro and whatnot right the nice thing about all hotkey is it keeps them all separate and it’s it’s really easy to compartmentalize like that ok let me

0:26:15 take a quick drink here did anybody have any anything else at least in the high level they wanted I am sure there are other ways that that I didn’t outline here and we’re gonna I think it’s on the next slide start playing with some of these things but before we move on was there is there any other way to connect with programs that you that I didn’t write here you know I know these aren’t very clear because because it will cover it when we dive into it but these were to me that the things I do more often than anything else okay I’m gonna go ahead and go on to the next one okay so this ACC viewer oh well it and just to clarify Stu it’s you’re not sending vbscript to accept your yeah no worries your you’re connecting to excel with

0:27:14 autohotkey Viacom and we actually have a whole webinar on using comm with excel so um so there’s the the links are on both of our sites and you can check them out a lot of good resources I have I think at least eight videos talking specifically about connecting to excel with calm and it’s just it’s so amazing how easy it is to interact with excel with uh with column the other great thing is um it it’s very similar to VBA as far as the autohotkey code and so you can you can even record a macro in Excel and then look at the code and borrow from it and make some very minor tweaks and then put it on a hotkey and then it makes it easy to then you can run it on a hotkey and again not have the code actually in Excel oh that’s true I see really real a are we layer that

0:28:09 yeah also you can you can do JavaScript stuff too I hadn’t thought of would be another one that would throw in there is if you’re doing something and you know now one I haven’t actually done a lot with yet but um selenium is a browser automation that allows you to connect to other browsers not just ie like Chrome and Firefox in Opera is that what it is there’s there’s a couple others and I never use but that’s it’s a pretty awesome way to be able to connect to them again programmatically not sending keystrokes right with just again it’s the really it’s not the it’s it’s gonna take you especially for new to it right it’s gonna take you a while longer to learn what you’re doing but boy is it much more reliable okay so this ACC viewer I think

0:29:01 I can click this link here and it’s gonna oh I gotta be in let me run this and flip these that did not do what I thought it would do I thought that flip them okay with the area okay let me get back down to where I was because it just be easier for me to click these and it’s gonna say hey this is this is actually gonna launch a program yeah I know so this is this accessible info viewer let me bring up just notepad I’m sorry site and show here so this kind of works if you’ve used the iw2 learner tool it’s very similar in the overall kind of concept of it and how it works I can drag this here and you can see the red outline right notice it even around the buttons and as I’m doing that this is getting updated right I’m purposely not showing you everything right now here

0:30:07 cuz I just I don’t want to keep it minimal and then we’ll get a little further but here you can see as I move over each one notice the name this is getting updated see this is the window this is the the class name which is important because when you start writing a script to access it more often and on this is what you’re gonna want to be connecting to is this class so you can you can look at each of these right and notice that the class that’s all the toolbar right in this case now let me go ahead and well this is the easy one here are other other info the other great thing is now I don’t have a script yeah we’ll see how we do on time I can pull one up where and show how I can say do a message box and get get the text that’s the the name field of this see this path

0:31:00 for that is let me find one this little bit longer let me you know here’s a good time to switch to tableau let me bring it over here in this window so see this Path number this is the action not too sure if it’s the dot notation but it is the path to that window that I was on there and it’s I’ll get to that in a second um on I’m I am and I’m not a programmer so if anyone can correct me or actually answer that question that’d be awesome but yeah Auto it the wind spy let me let me bring that up because that yeah I have that as a this one you’ll see when you click on here here’s the clock oh and I can do it windows a to freezer so see that where it says control under mouse button so this is giving you I’m sorry there’s the text oh but in this this is the problem

0:32:04 with tobblo it doesn’t have specific classes under it versus if we go back to site and let me hit windows a again and I’m in here and now when I’m under it you can see there’s that tool there’s that toolbar three two one right and let me grab this one and go back up here so that both of those are giving me the toolbar 3 to 2 in that case let’s see if this actually gave me where did that go oh maybe I that’s interesting oh I didn’t click on it sorry my bad so there’s toolbar three to one and this one is saying now three to two I’m curious and this is where the winds by which I don’t have a shortcut to it but it is one I wanted to demo I think I put a shortcut to it in here yeah oh I actually I’m using wind specter this tool this is another tool

0:33:13 that you can do very similar things it’s it’s even more complex and there’s different ways to get to it but um here’s that toolbar window 32 and you can get to classes that way as well as to what it’s doing in didn’t I don’t want to go there yet let me jump back to the ACC viewer first because this is a different quote unquote approach I don’t know the best term to use channel or path I’m not clear on the terminology how to use it there but the except this accessible info viewer when you’re accessing and actually so here the great thing about this accessible info viewer [Music] I I don’t know for certain do on your question about running it as an admin I got to think it wouldn’t hurt that’s for sure right but um that’s a testable

0:34:11 thing unfortunately I’m I’m an admin on my computer and I don’t think it’d be easy for me to flip it but I think you probably I’m try to remember I used to at work I wasn’t a super user and I think I used it yeah yeah I used it there it seemed to be okay so I think you’re okay running it without being an admin now just because it displays the stuff doing the stuff in all HUD he also you might want to be an Advent when you’re running your script all right so let me get back into this because the other really cool thing I want to show you so with the active window in win Specter and stuff I was trying to do things in tableau tableau and unfortunately it was um it was coming up blank I wasn’t able to basically see anything coming back to it and when I

0:34:59 finally got to this accessible info viewer I could literally see like wow I can see each of these things here’s the part I didn’t show you yet is the the structure you can expect these right you see the red updating down below right so I can I can get and I can start understanding and looking at the structure my understanding here is a caveat is there’s a couple things the the the structure that is here that shows up here is dynamic and it can change and so you can be doing something and then let’s say I clicked a different window or I clicked up here and this structure might change and from what I understand is there’s one of two things that can happen or well I don’t know how to say it be an issue is the program

0:35:51 itself the program being tableaux in this case when it does that update it needs to go tell windows hey I updated this structure right not all programs apparently do a good job of doing that so so unfortunately even though you set this up and do it right sometimes these lists may get static and not be tied in longer to what you’re doing so that’s a caveat one the second one is of course you can’t always see what’s actually in Windows I just I don’t know if there’s an easy way to UM to be able to tell where the issue is I just know that that sometimes this hierarchy is is not accurate and I’ve run into that but this path down here after you find the item you want so in this case let’s say I wanted to connect with this button here right so see this

0:36:46 path here I can click here and now that just copied it to my clipboard by the way it’s a really weird thing but if you download this and I if you download this from the forum the the path for some reason it will sometimes come back as comma delimited and set up dot delimited make sure you replace it with dots instead of commas I have made a manual fix to the version I downloaded and I did it just yesterday and so far I haven’t had any issues I’m just not a good enough program or to say I did it one quote correctly right but basically what you can do is you can get this this path and then in another tool I’m sorry so you can read anything you see in here in these different attributes or elements you can read and grab programmatically here’s where I wish

0:37:40 Jackie Jackie’s done a lot more in this than I have what he has told me and for when I’ve skimmed from the web if the default action of the thing that you’re wanting to do if it’s default action is what you want it to do you can trigger that so I could send let’s say this was the copy right I think it it um Duke oh sorry duplicate so the this buttons default thing I will bet you money is to duplicate the worksheet I’m on right so as long as the default action is what you want you can from my understanding I haven’t done this yet you can trigger the default action through and let me get back to it my powerpoint deck oh here we go oh and I don’t have it on that page this ACC library this you can download and

0:38:37 this one has a lot of the functions that you would use to act on the things you’re getting from the viewer so this is where you can find the functions it says click that you know the path to this thing right so it I know I’m not doing a great job but I I didn’t want to go too deep into quote-unquote how to do all these things it was more to help you understand there are ways out there and then you can hunt them down or we can maybe the follow up have another webinar specifically around this ACC library or doing stuff with these controls which we can get into next year but it is this this approach for me like in tableau and another other tool I was using it was the only one that I could actually programmatically interact with the other the control messages and stuff and the

0:39:25 shell hopes and this menus none of those worked of course I could still send keystrokes right and I can click at spots but again if my resolution is different than on different monitor or I minimize it move in whatnot right it just becomes programmatic so I try not to send keystrokes I would shouldn’t say what I can cuz sometimes that’s the right solution right I need to do something here in the next five minutes and hey that’s the way to go but if I’m doing something more robust and that’s the case I need here I wanted to have a way to interactively what I’m working on is I need to come through and on my other deck this is some study I did for someone for free and the condition was I could share data anyway on the deck I’m

0:40:15 doing for my client I have like a hundred slides and crazy enough there’s no way to export each slide and say save it as an image and so you have to manually come in here go up to to worksheet export image choose the thing hit save and then tell it right and I’m like yeah I’m not doing that a hundred times especially this is just the one time right if I make updates or the next project so I’m like you know what I’m gonna write a script they’ll iterate over all of these and export them so anyway that’s why I was jumping into this so let’s get out of the accessible info viewer in let me I wish I wish that wasn’t maximized okay because I want to close that and let’s go into controls is that what I have here oh you know what just cuz

0:41:08 they’re tied to it let’s do the screen reader you know I’m just gonna open up the folder here so my screen reader this is the program that I mentioned super see the screen reader sorry it is let me go back to here it is leveraging this IUI automation interface and and now that I’m actually in this screen let me hit my hotkey that’s it’s much more inspiring when that actually works close all this stuff oh did I I forgot I’m sorry I didn’t I didn’t it’s he the guide the wrote this is the if I remember he’s the admin manager of the Chinese forum and his hotkey which he had it hooked to was the the caps lock key and you can update it there but that’s not my normal key but I figured it’s such an awesome thing I’m like I’m not gonna mess with it so if I

0:42:09 hit I’m in here to hit caps lock so it just said I’m in text box let’s see if I’m up here what it’ll grab so notice I’m hovering over these and I’m hitting caps lock and see the text showing down here I mean that to me is pretty darn awesome and you can be I can be and let’s go back to let me open up a brown I’ll use Firefox and I’ll hit my button oh that’s interesting so it grabbed my Oh grab it there I just had to highlight the page first so it is it is do an amazing job to me of grabbing the text under what my mouse is hovering over in this I haven’t played with the you know with with 80 programs but um let me see and I didn’t try it in tableau yet I’m curious what wow that must be a hot key for that that’s interesting the next one off a so it is grabbing that stuff let’s

0:43:14 see down here yeah that is is it kitten I’m hitting it right now I don’t know if it’s not coming up for some reason did it hold on huh oh you know what I forgot I was I was playing this and I think when it no yeah what it said to do is if it doesn’t find text it doesn’t display anything if I remember right but again the this the webinar and I want to show you guys this isn’t like hey here’s your solution right it’s that wow there’s some amazing technology that if you’re trying to to programmatically find where you are in a page this is just one example of like it’s it’s somehow interacting with tableau which was by far the hardest one I had but with these other programs in and grabbing you know the it’s it’s

0:44:16 getting programmatically the what I’m under right that controls my guess but but pretty amazing let me see if in here oh it’s yeah so that’s interesting so maybe it is getting no that’s weird with with PowerPoint I’m not sure why it’s getting that and not maybe if I was running it instead of editing it that it would get everything but I thought that was a pretty amazing piece of tool software the problem is it doesn’t have a viewer or a way yet to easily say hey go click that button or tell me that location right to programmatically like the accessibility viewer where it was telling me the dot notation to always go back to that one spot it does I don’t have a tool to get that so I don’t have a complete solution there but it is a pretty amazing to me pretty amazing bit

0:45:09 of code the next one let’s see what we’re on here this control click stock I grabbed this off the forum in this when I’m what I’ll do is I’ll make some clicks and and I think this one I did adapt to my yeah I adapted it to to my hotkey it’s showing me where I clicked right the app so it unfortunate didn’t grab the because it should have had the the window name oh here went on window key webinar PowerPoint so that first one I don’t know what I was on but it didn’t grab the information the second one it grabbed my PowerPoint let’s see what happens when insight I think it does a good job oh I forgot I have to it’s when I click let me see it that there we go I had and so here is the the site it shown you I left must left button

0:46:14 clicked on this window at what time and then it’s telling me the controls right this is the staff this control and the hWnd that’s the window ID the programmatic away to click connect with that window but this control and that are telling you how you can go grab that and so it’s a great easy way to see where you are and what you clicked on the you get tool with which I’m just reading your comments to is it yeah you know we’ll we’ll go back over the slides here in a bit okay so just so I don’t lose track of where I am this label controls now it let me exit out of this I don’t know if you’ve seen this scroll mol-1 our software I’ll just say one our photo um label control so this is kind of a neat tool that when you’re in a program

0:47:12 and you hit control oh no there we go so see these numbers pop up it’s telling me the order that these are in and so again if I can programmatically especially because I can see these numbers I’m pretty darn sure I can programmatically say I want to click item 13 right and so this has given me that key to kind of see which which number it is so I could say control click and I don’t I mean I think there’s a way to do numbers but again it this is to me more just it’s a really quick easy way to say if I’m in a program like here I’m clicking it but they’re not showing up right let’s and I know in tableau it didn’t work but let’s open up notepad but you can see here right there are the numbers so again I can yeah of course I could write

0:48:12 a script that would highlight notepad send the Alt key and then send F right but if I could programmatically tell it to click this control right it’s gonna be much more reliable than sending keystrokes and so this label controls doing that the wind get that one also has to do and I if I remember right so this first bit is showing me if I was to keep hitting yes it would iterate over all of the controls I’m gonna hit no here and it’s gonna defaults we’re now in this one script I think I grabbed this from the autohotkey help page and again these are all been our links when we send out but it will actively when I when I switch windows it will update and show me all the controls on that page right so on this Explorer window notice how when I go from this let’s try power

0:49:17 point notice they change right so this is it’s a it’s a quick way that I can go from program to program oops in see so notice for this one there’s just to edit one and then the that status bar are three two one whatever at the beginning of that so for me this is a quick easy way if I’m if I’m trying to figure out hey how am I gonna interact with the program can I use controls this is a quick easy way because when I’m on tableau again see how nothing is I don’t I lost my my tooltip right it’s because virtually nothing has controls that that autohotkey can see now I don’t know why right I don’t know if it’s something’s you know I miss or Windows is blocking in or tableaux as my guess is it’s not making it available versus the Explorer

0:50:07 one I got a ton here I can see all these different controls and again I can programmatically say I want to click the you know third combobox in and do something with it right now and it’s also annoying so let me there we go we get rid of that one this menu select now this is a built-in functionality not a hotkey also it it’s an older one so if you’re if you’re the program here act interacting with is older I’m trying to find my because I had an example at least I thought I put one in here and I’m not seeing it it what it’ll do is it will interact with that the menu and programmatically send the whole what what you would do is say file open right and cuz he under file then there’s open and it would programmatically if it has

0:51:11 access it would send that so it’s like coming here and hitting control oh right but it’s again it’s more reliable than sending keystrokes I don’t I swear I made one maybe move it in here by mistake let me let me see if I can pull it up it’s a very tiny program so I’m gonna search for something with and you and I’ll search and stuff today this by the way this file search it’s actually not a free program but it it mimics the old search light from windows 7 or maybe it was even XP yeah I think was XP and it’s just so much easier to use than the newer version to me especially if you want to do something complex right you can change the dates you can tell it where it it’s between if it has a file size or the I guess type I think works the same way as the old one did that

0:52:13 should have found that already all right I guess maybe I was crazy the other one is that I use I know this little off topic but the grep win is great for looking in certain files for certain words and so let me go back to here you know what I did such a simple thing it’s at the bottom of that page I’m just going to go navigate to it oh look at that that is the path to my file that I’m looking for so so okay so I anyway controls messages that’s what I did I put is the hyperlinking link there let me see if I can go back to notepad our site there we go so here is there’s an example of using my path in the clipboard anyway so I am going to go ahead and run turn it there’s something with my site thing lately it’s been acting weird all right

0:53:44 look I see my [Music] okay I wanted to be able to launch it so now I’m gonna launch it and now in actually well now I’ll pull it back up so let me explain it real quickly here so this when menu select item it’s saying okay what window do you want to have this effect on I’ve told it untitled notepad right which is the title of this one now of course you could also I think use the class and say look for notepad class you could also change it to be a fuzzy match a match just notepad or something starts with untitled or whatnot I think any of those working there and then I figure out what this parameter is here but the next one is the the menu you want to first click which is file and then under file I’m

0:54:36 gonna click open right and so now when I launch this well I don’t think nobody has to be highlighted when I launch it it goes to that open window right it sent that command to notepad programmatically again something this simple yeah you know what keystrokes probably you’re gonna be pretty reliable but again I can let me see if this works um I’m gonna keep notepad a hidden and send it and look at that it it’s sent it’s a notepad it brought it up to the above oh thank you relayer yeah that that the the blank one is if you want to restrict it to certain text and now the faster you said that I remember you can have it filter it also if make sure that a specific text is also there I believe is that does that sound right really over there relayer

0:55:32 but yeah this is another way again and I I tested this so let me let me oh and I should I have it oh no I got rid of it so let’s adapt this all right I’m gonna duplicate this comment it out I’m gonna use my window spy and get the class or get the name of this program here this title come back into here and now I’m gonna put it here right so basically all I did was said now instead of doing it notepad and I think here under file and open this exists in site right so I’m gonna save it and when I [Music] it doesn’t work know what I do it’s weird because I did this earlier and it worked I must have done something a bit wrong here it doesn’t look like it though but I did test this earlier you know and it worked fine

0:56:29 let’s see you file oh maybe it’s the dots does it neither dot let’s try a new and see let’s just change this to new and that I wonder if that’s case sensitive also damn it anyway I did do this earlier but that’s basically what I’m doing right I’m updating the the title here and then sending to list I know and I did because I did tools debug also you try it one more time yeah I’m not sure where that’s not working but I have done this yeah I don’t know but it oh the other thing in this one let’s comment this out is you can do it by order number and so again I’m still using the thing to notepad but I can say sent you the first click the first menu under the first menu click the second item it’s really weird to me the ampersands after it instead of before it

0:57:46 but I know that’s that’s typically in gooeys for the shortcut hotkey type thing but that’s how that works and this menu select what I was on oh good good I’m all done because calm like I said we have a whole webinar on that it is a great it’s a great approach where there’s a lot of resources for it however if your program doesn’t have calm built into it then unfortunately you don’t have that as an option so is does anybody want to mention anything in particular as far as if they’ve used any of these which ones they like over others do you have other ones that you use if a different approach and actually we’re right at the hour you know what let me I am going to stop real quick here in the sense I’m going to stop the recording so

Comments are closed.