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

ACC Library and ACC Viewer in AutoHotkey v1

The ACC library and ACC Viewer are amazing ways to connect to Windows programs!

The ACC library is amazing! You can watch a live call where we discusssed it here

the-Automator Live Support for AutoHotkey: Working with ACC library
the-Automator Live Support for AutoHotkey: Working with ACC library

The video covers various tips and techniques for accessing and manipulating data in CRM tools, programming languages, and productivity systems.

  • 00:00 🌪️Speaker uses Acc Viewer to locate window path and suggests checking building process.
    • When links are broken for autohotkey resources, try using the cached version or check the zip file with available resources.
    • The speaker spent an hour looking for an up-to-date version of acc viewer to locate a specific window in a dynamic program, but ultimately managed to identify the window’s path without being able to read its value.
    • The speaker shares their contact information and confirms that it is okay to share their own information.
    • The speaker shares their screen and uses Acc Viewer and Windows Spy to find the value of a record, noting that the status bar text can be accessed programmatically.
    • The speaker suggests checking the building process to ensure it is done correctly and mentions the need for additional materials.
  • 09:57 📊 Different approaches to accessing data in a CRM tool were discussed, along with finding a personal productivity system that works for each individual.
    • The speaker discusses different approaches to accessing data in a CRM tool, including using network traffic and programmatically accessing a local database.
    • The ACC Viewer is a defunct accessibility tool from Microsoft that is still built into many programs and can be programmatically interacted with, but has been replaced by UI Automation.
    • The speaker explains how to programmatically find the position and size of a window using its path, which can be represented by a series of numbers separated by dots or commas.
    • Window 418 has a value of one record, but the menu and title bar are empty and there is no way to programmatically access the value.
    • The speaker suggests finding the value of the content of the text programmatically, but if that’s not possible, the position and OCR can be used to locate it.
    • The speaker discusses the importance of finding a personal productivity system that works for each individual.
  • 21:27 🔍 The speaker shares tips on navigating and resetting paths in a program, testing program accuracy, and identifying objects in coding.
    • The speaker discussed their organization system for their work folders and tested a tool for finding the position of a value in a program.
    • The speaker discusses how to navigate to a specific path in a program and reset everything, including how to read the location programmatically and which acc library to use.
    • The speaker discussed the structure of their code and the use of various commands and options.
    • The speaker tests the accuracy of a program by identifying the window title and data, but acknowledges that the method may not work in the future.
    • Objects are things to store data and are the next stepping stone after functions in coding.
    • The speaker discusses how to check if a variable is an object in a script and suggests adapting an example from a different program to fix the issue.
  • 32:55 💻 A lecture on how to activate and call windows by their title and coordinates using a script in Python.
    • Remove unnecessary code and use aka class with the program name to get the hnd and title of the crm.
    • Separate the window out and comment out examples to avoid getting it wrong and make it easier to go back to.
    • The program requires the executable name to work and can find running programs without needing the path.
    • Testing a class with and without an AK class to identify the correct program and coordinate for a window.
    • The lecture demonstrated how to activate a message box window and call a window by its title using a script.
    • The speaker discusses the position and coordinates of a window and suggests removing a message box that is no longer needed.
  • 42:28 👨‍💻 Use shortcuts and commands to navigate through windows, extract text with “Capture to Text,” and resolve technical issues with the CRM using the msaa accessibility approach.
    • The speaker discusses navigating through windows and sub-windows in a program using commands and shortcuts such as Alt+Left Arrow and Alt+F1.
    • The speakers discussed programming keys and the use of coordinates, but were unable to programmatically find the value of a location in the program.
    • A program called “Capture to Text” can be used to extract text from a particular section of the screen, and it can be shared through Zoom.
    • There were technical issues with the CRM, but they were resolved by restarting the program and using the msaa accessibility approach.
    • The speaker provides instructions on how to use the inspect tool to locate a record in a CRM, but the UI automation option does not work for older programs.
    • There is no programmatic way to get the text from UI automation, but there is a system to know how to get it if needed.
  • 54:48 🔍 Learn how to find coordinates and display structured data using R Studio, while avoiding library inclusion and fixing code errors.
    • The speaker demonstrates how to find coordinates by drilling down the main structure and accessing the account viewer.
    • The speaker suggests using the class n n to simplify the process and tries to get the value programmatically but couldn’t, so they duplicate the line and add a message box for testing.
    • The speaker discusses the process of finding the position in the acc get function and explores the available cmd options, including object and location.
    • The speaker explains how to display structured data using the matrix m function in R Studio.
    • Including libraries in code can be avoided by using an include statement and relying on Autohotkey’s automatic search function.
    • The speaker encountered some issues while trying to run a code from a file and had to edit the function to fix the problem.
  • 01:09:18 🔍 Having trouble finding the right function in the studio folder, troubleshooting XML and file paths, and using a function object and “dump” tool in AutoHotkey programming.
    • The speaker is searching for a specific function in their studio folder and discusses the challenges of finding the right one.
    • The speaker troubleshoots an issue with XML and file paths in Android Studio.
    • The speaker discusses a function object and a tool called “dump” for peeking inside objects in AutoHotkey programming.
    • The speaker is troubleshooting an object that is breaking and trying to figure out why a certain line of code is not running in their program.
    • The speaker discusses a program error and confusion over the use of x and y coordinates in a message box.
    • Test with specific inputs and force feed numbers before using variables to avoid errors, and lack of documentation may contribute to difficulty in working with this.
  • 01:29:10 💻 The acc library automates tasks, but its implementation varies.
    • The acc library is a complex but useful tool for automating tasks, but its implementation varies depending on the program.

Transcripts to video on ACC library

hey everyone happy friday weget the trap [Music] everyone’s doing well it’sback to freezing here again it’s30 degrees outside yay just below freezing oh yeah yeah oh oh in here sean tom our reached out and saidhe’s not gonna make it today unfortunately buthow are you guys doing we’re good we’ve got a storm in the uk at the moment everyone’s batting down the hatches
oh reallyyou know i didn’t think about that like for us in the state like texas it’s so big a storm we wouldn’t you know like the storm might hit all of texas maybe but it’s very rare but i guess you know because i know a lot of those some of those countries are pretty you know small in comparison right so it’s not the small it’s a fact that the met office has issued a threat to life warning which they only do once every 20 odd years wow so you know having winds here is not a problem okay we don’t have tornadoes
like you do that you know tear up whole towns but for them to issue a threat to life warningbasicallyeverything grinds to a whole ever the shops close everyone goes and hides is it is it just cold what what’s the 19 miles plus an hour winds oh really wow okay all right soi’m sitting in a garden office which is made out of wood and i’m thinking i thank god i’ve gotconcrete tiles on the roof or the thing would have taken off by now yeah yeah and we’ve had power cuts and flickers so
if i vanish it’s not becauseyou know you’re like yeah yeah soi’ve hadi’ve got great fun with what youhelped me out a couple weeks ago that was really really usefuli think i emailed you earlier on i don’t know whether you’ve got time to ever thought about thisit’s about i managed to get a hold of all the bits of software a lot of links are broken for AutoHotkey you go looking for a resource and you get a nice bit of text and the link is broken yeah one you know one thing you can try it may
not work but if you’re using likegoogle is to you know if there’s a drop down next the thing you can right click you know you can click it and say see cached version right at least then you have a chance and that’s that’s not an AutoHotkey thing that’s just in general right okayi’ve done that before and been able to find stuff i also you know i’ll need this let me write a note to myself to share iti have a library of fi so there’s a really long complex history for the forum the AutoHotkey forum yeah
one point links they’re broken the links there where they’ve got here is the library for this and you go and click it and it takes you to a totally different website yeah well at one point the person that was running everything kind of anyway whatever he justhe he did something and they created a new forum and then the old oneand actually no i’m sorry this was a separate issue at one point that the site got hacked and a lot of stuff just disappeared and tank who’s the the forum adam and he’s
been for a long time i think he was the one or maybe was the other guy we stored a lot of it but we couldn’t there was a lot of stuff still missing but we had files so there’s a download which it’s a zip file iswhich has a lot of the resources so if you go to a link and it says hey find this and it’s not there look in the zip file that i’ll i’ll make available which i can throw in the chat here easily but i’ll post it on my site just so everyone has itbecause it it often has a lot of the stuff that you’re
looking for right awesome so i’ve spentnearly an hour looking for a v1 yeah i mean on my side i have that right if you look at the yeah soandi have this crm application that i told you aboutand i’ve i’m trying to useacc to get a umthe location of a particularwindow which i can’t use with normal get control etc etc because every time you move the window its name changes so all the edits and all the statics
their name changes every time you launch a program yeah there’s there’safter the original stuff that AutoHotkey controls are built off ofwere used for a long time somewhere i don’t know i’m not sure time wise but program started using these more you know a newer version and they were kind of dynamic and every time you do stuff they’re dynamic and they change and that really through a monkey wrench into you know how we typically go my in in your email so your email it wasn’t quite clear exactly what you were you
know going through because it’s a static thing and not shown but anywayiswhat you can do is is identify you know even with controls often you can identify a parent or something and and use some sort of an index approach right but my first suggestion would have been to look at the acc viewer and see if that can give you what you needwell about an hour ago i managed to do that yayso i managed to get a path to where i want but the path while it identifies the windowi can’t read the value of it
so at least i can identify you need to be more specific than that when you say value i don’t know what you meanokay shall i show you if it’s long as it’s not privileged stuff sure okay let me just check make sure that’s not privileged stuffshootswhat i’ll do isi’ll grab my nameright i do that a lot so for those that understand you know when you have you created an own dummy kind of case or you select yourself that you’re in there and then the information’s yours and you’re
okay to say it’s okay to share the stuff right of your own soi’ve brought up a screen that is basically mymy crm with my name and address in it so if people want to send me messagesand call me up and say i mean you knowdid you share it i haven’t seen it yet no i’m not shared it yet is it okay yeah yeah cause i’m in the phone book i’m i’m a local photographer yesso if someone knows my name they can look it up i’m you know i’m in the phone book right soi’m gonna go to
[Music] go to there and do share screen how do i do share screen on the the toolbar in the middle there’s like a green box yeah gotcha gotcha okay soshare awesome and i’m gonna share my screen awesome right so there’s some code that you can see there is thethere is the crm again and if you look at the bottom here it says one record i’m trying to find the value of that one recordand with acc viewerlet’s let’s bring up acc viewer and see what we can do shall wewith the built-in window spy did it not
tell you anything and that was helpful like because sometimes those things will be thejohn remind me if you remember what theokay so his windows spy here’s windows spy and if i go follow mouse and i click on that it gives me the class cnn i’ll be can rb canvas pain 619 which is what i’m looking for at the moment however when inext time i restart the program or if i do stuff and i come back to it it’ll be different yeah no what what i was just mentioning is see see how there’s a blank spot that
says status bar text on the on the windows spy there’s a blank box called status bar text sometimes the bottom of your screen of what it is it’s the status bar and you can there’s a different programmatic way to get that so that’s why i want to confirm that like it wasn’t it’s not a status bar yeah okayit’s it’s a separate window and it’s still i’m just saying that no matter what it is they can still build it in a way where it could have been right you never know okay and that was
simple so that’s why i’m like hey let’s just check it okay wellthere’s other bits and pieces i want to be able to get for instance can you see i’ve got three phone numbers here yep i want to be able to say well get me the first one the second one or the third one but this is a combo box that’s continuously changing and the name of the combo boxes let’s let’s before we dive too deep into this let me just ask you a couple questions right what is this this is a this tool is a crm tool is that correct
correct where is the data is it is do you know is it stored like in a sql database is it pulling it from online it’s doing both it’s storing it locally and it’s it’s refreshing with online there are no apis that i can access well okay it’s locked yes you you know you i mean you can’t right you can you can see your browser traffic right every browser call is an api call yeah but this is not a browser this is a desktop even if it’s not it’s still network traffic so i’m just saying
i’ve hacked plenty of stuff where it’s like hey there is no public api but i can still see my traffic and i basically figure out how to do the calls for me instead of for the program right but that is much more advanced right i’m just i just want to talk through like okay but then there’s also on your computer there might be like a sqlite database right that we could programmatically get to and just skip this whole crappy you know interface right i’m just again and maybe it doesn’t work for you
in this case but you know other people are going to watch you so it’s good to talk through different approaches that you might take absolutely well because i’m nearly there this approach we’re like if i can have a show you one thingand then we can look at the the database optionand the we don’t have to do it i would just like i said i wanted to outline different things that people might try right because again that’s going to have pii if we do start getting into it that we can’t easily filter on right and it’s
pretty complex yeahso if i’m looking for theaccviewerwhere have i got it i’ve got it here i know i downloaded itso the acc viewer that’s something i think jethro made the initial stuff on and it’sit’s theaccessibility stuff from microsoft that’s kind of built for stuff especially for like blind or deaf people whatever that there’s a backbone into a lot of programs that we can programmatically interact with to do stuff with it’s it’s now defunct there’s
the the ui automation you know has replaced it but most programs still have this built into it so it’s a great one and more importantly we have a way to programmatically like get stuff from it this acc viewer tool that you’re launching here is it gives you a path that we can use okay welli’m just searching for it because i misplaced itcan you chuck me the code in thethe code file in the in the in thein the chat is that possible i’d have to go find it but i’m just i know i downloaded it today
and i’ve just misplaced itmaybe it’s running on hereacc viewer here we go acc viewer no open folder just i’ll borrow there we go inside studio altar will run it okay there we go oh that’s yeah that’s a different that’s not the one i use but anyway okay okay so bottom line is here it is if i go up to the window and i click on the big window up here it shows me that this is the software and etc now this element down here if i show the structure this element down here it’s it’s here it is
it’s a window and it’s got a location but it’s got nothing else it’s got no names got no value yeah it had a path of four so see the four in the path correct but can you see it’s got this is a cnn that i am spy brought up okay that will change next time i launch the wind the program so i need to find out programmatically via the path what thewhat the[Music] position of this window is and the size of it because then i’ve got one of your ocr programs that does a beautiful job of of just looking up what’s the value
well i i would still try to use the fours the path and actually just see if you can get even though it’s not shown in the name and value i mean there might be line breaks or something and it’s not displaying it but that’s before can you see this cnn well my thought was if i went to the main window and went from the top down let’s find out where it is so i get a longerand just find out where it is eventually i’ll get to it i think it’s number 18 there we go it’s number 18 there okay from the top
so now i can get to the top window so the path isfour comma 18 from the if i select the big window the main window well but the i mean when you use the path and and [Music] i vaguely remember that someone had like a different v1
on the 418 and see the menu and title bar and other stuff well i i can and those are all emptyno value comes up to any of theseif it did i wouldn’t need to mess about with ocr you knowso this is window 18 so let’s go to the clientwindow one and i can basically explore all of those there’s a value of zero come up on there but but i know the value is one record soi’m looking for the text that says something something to do in that window [Music] and it’s empty i don’t know what grip is but
it’s all empty yeah the other yeah i mean that’s very odd so basically we’ve discovered that this window that says one record in it is418 yes which is up here but everything else we delve deeper into it we couldn’t find programmatically how to get hold of that value if you noticeit doesn’t come up with it comes up with the cnn of the big window not of theof the 619 when i do it this way i would have thought the cnn would have changed or is it looking at the main window at the top for it
no i think it’s just looking at the the overall okay in which case that’s fine but it’s that we know that that one there is619 from previously so my thought is if i could have gotten it programmatically by going down the path saying give me the value of the content of that text that’ll be fabulousbut as i can’t at least i can find it through the path its position and ocr hold on let me let me first let’s let me give you let me find mineand give you my v1 you’re
using let’s just make sure it’s not an issue with the acc viewer that you’re using awesomebecause that would be terrible yeah so i’m going to chat oh come on it’s just what
okay i found the file okay i think in the chat now it allows you to upload and download files it always has for years here we go acc for jj okay lovely and pop it into just as a helpful tip which i know you know you’re doing stuff live you know and on the fly and working on stuff buthaving a clear structured path of where you save stuff it takes a little more time at the beginning but it helps you so much in the long run to take a couple extra seconds you know and that way you don’t lose stuff because it’s so easy i mean if you
see my files and structure right i have thousands of different things and it’s just it’s if i didn’t do that it would be crazy okay well maybe we need a tutorial on that as well i believe you’ve got one somewhere have you not no no no i don’t think i’ve ever talked about that i mean i i talk a lot about it in my videos just as a general concept right but it’s because it’s whatever makes sense to you right i’m just saying i put things i’m working on i have a hk work folder and then under that i broke it
into there’s general stuff there’s apis and then there’s like AutoHotkey functionality and then i know intuitively where i would think where they would go and then i have folders under each of those with the stuff so anyway there’s my tool let’s see how if it does any different which i doubt it will but i just want to confirm because well it’s got red so there is there is theum there is thethere is that client is coming up with the same name yesit’s not letting me it’s not letting
me make that wider it’s not making me this when allowing this window to get any bigger yeah okay fine soso there it is there the value zero and i wish somewhere here if we could find somesome way of finding it programmatically but it doesn’t look like it’s there okay so the next step is can i access its position well if i click on it there is its position there and then i’ll just ocr it and you know what the ocr that i’ve used thatyou guys have recommended has worked particularly well
um and it’s it’s dirty but it works you knowthen i can ocr that rectangle basically so in order to get to that programmatically i have a path if i go to the main windowand then navigate down to that path how do i reset everything this has got says path two that’s because that’s the two yeah yeah i’m looking for my apologies from the main window which i can alter Hotkey can can select yes saying go to the main window and then drill down to the path until you get here i can’t go here directly can i
well that is four i mean that was the same path as in the other one correct so how would i how would i basically read this location programmatically did you watch the webinar or we talked through the using the vieweryou i did and this is the bit where i got confused and it didn’t work for me so there’s there’s about two lines of code it’s not particularly complexif i move this out of the way okaythere is where’s my code i’ll look [Music] there i’ve got bars everywhere and you
can move out of the way hey you can close down i need to get there and i need to go right okay here we go [Music] now again i don’t know whether i’ve got the right acc document yesas in though acc library okay so that’s the other question i believe i have it’s the jethro one okay and now i’m looking for my [Music] there we go there’s my code so this is what i structured in my code get the hnd of the program get the win title of the program and and
look get an atc get for you’re saying this should be a .ahk id of of of the of the main window okayis and is it roll or position what what is a command here that should be well if anything i’m pretty sure it’s r-o-l-e not r-o-l-l buti’m going from memory but i’m pretty sure that okay there’s a couple options that could
be therei don’t programming this you know very very rarely so it you know it’s something that what i’ve done is i’ve just popped up a message box saying this is the window title i found of the main window and this is the the whatever data i found in there okayand then i’ve done it 619 which i know what it is i manually put that in and then it gives me the manual of what it is so if i run itall right what was the 619619 is the current name cnn name of that particular windowwhich will change so i know it is
there now in that 6y9 if i relaunch a program it’ll be different so in this iteration it’ll work but in the future it won’t so this is just to test that the acc version matches the actual window but i know what it is oh okay okay it’s just a test so if i go up here and i launch my sidekick bar and i hit my test button okay so it says okay this is a main window i’ve got it well done i’ve not got anything no data from the acc however from theby knowing the cnn i’ve managed to use a
win get and get the size and location of the window yeah so the first thing i would do is is correct look it’s there there it is it’s correct okay so that confirms that i’ve managed to get it via the cnn name buti’ve not managed to get it via acc right so first thing i would do first thing i always do in something like this is confirm that o position is an object because if it’s not an object you don’t got a chance at all right okay so here’s me sounding like a noob which i am what’s up what’s an object
well that’sobjects basically our ways just you know there there’s object-oriented coding which is very complex but objects in themselves are basically things to store data right it’s one thing but no okay they’re they can be stored in a variable but they’re not quote a variable but anyway it’sto simplify it and i’m just going to point you to some videos i’m talking through because it’s like first off it looks like you’re using functions which is great it’s one
of the best stepping stones objects are the next one once you start learning objects oh the world becomes easier right so it’s a really good one to learn butso let’s just do this and then maybe later like i said i’ll find some videos or something where i okay i know i cover it and stuff so on one five five nine yep start off with a message box yeah yep and and by the way i just happen to know this returns an object right and how you were accessing it i believe was as an object so you’re trying to store it so
do the percent sign space and then the command is object is i s is object so and then i’ve left paren and then you’re going to put in what you’re checking which is the opos right now that’s going to say hey is this thing if it returns with the one then it’s an object if it doesn’t then it’s not an object by the way did you use the include command or i don’t know if we even need it butnot okay well where is this no i don’t know the include command is in there it’s up at the top okay yes acc is part of part
of iti think if you come down here you can see that acc is part of the that’s fine and this is this is thelast updated 2015 whatever that is by jethro 2012 sorry 2012. yeah so did you did you run itit’s included so it’s part of the it’s been run yeah no no i’m saying did you go back to your original script did you run it no let’s let’s try it okay the original script is running i need to go back to the crm zero okay so it’s not an object so there’s no way it’s going to come back
with a value if that makes it and i know what you don’t it doesn’t make sense i don’t understand what you’re talking about but you’re going to let’s fix it and then you can educate me later no well i mean it’s important to understand right if it it it’s not returning an object which means there’s no there’s no any sort of value because it broke how’s that right it didn’t work so there’s no way there’s no chance of it working is my point right okay so what we would do let me see so acc get
let me see if i have an examplein my you know stuff where i play around with it i mean if anyone else uses it great chime in right but i just don’t use it very often i mean i i i looked at thethe code that you guys had when you wereusing the so how about this so let me puti’m going to put the whole whole thing and then let’s adapt it okaythis is for something else i did with withsomeone for a different program so it’s obvious it’s not going to make any sense i wish i had an example like using studio
because then it would be you know we could we could do it on that and then we adapt it to your tool right because because i have studio right and then we couldi use studio as you can see okay so i’ve got what you’ve asked to download and i’m just going to put it there so this is your code down here okay x y equals acc get location awesome which is what i want so the set delay 300 sn you can you can get rid of the 15 i should have brought that in sorryand i don’t know sn is that used anywhere you can get rid of that too
um but the now the line 1559 so get rid of 1557 as well just because it’s junk yeahthis is where we need to make sure we’re doing something you know how how did you get borrow from what you did with the so the ahk id in yours in 1567. yeah okay so basicallyi went to get thethe hnd of and the title that programmatically of of the crm okay because i saw the example here as hnd so i had to use that well let’s just use the one i can use aka class here and just put the program name in there can i not
okay no not in the class the program name would be to the right of the ahk exe online 1557 over to the right let’s leave this because we know it works we know that works how do you know that works because it comes up with the window here i ask it in the message yeah but we don’t know if that works with with our example right yes i see i see okay so let’s separate these two out first of all is window so let’s let’s sort the window out here okay let’s put my window in there hold on first thing the in
i’m going to interrupt you more than i normally would right because it’s part of it’s just to give you kind of tips on what you’re doing like like the stuff you just pasted in a mind like online 1557 yeah we want to keep that example right so just com duplicate it comment it out and that way we can always go back to it otherwise you’ve got to go back from scratch and see what it was and if we don’t have a visual reminder it’s very easy to to end up getting it wrong you don’t want to once
we start changing it and then we’re like well crap what’d we doawesome thank you and you know what this is actually the way you’re stopping me working and changing the way i work is actually more beneficial than actually i hope so you know and again it’s for other people too watching but it’s in it’s believe me the way i do things isn’t the best but from years of trying yeah it’s like you know what the other one which which i know we talked about last time was i personally would have grabbed this
into its own script and that way i know this is exactly what i’m working on righti don’t have other stuff in here but and it’s okay it’s just for me that’s what i do okay solet’s we can comment that out we can comment this slot out here so sorry the name of the program is light blue is that right yes yeah okay okaybut we need sorry see how at the end of my line 1558 the exe it spells out it’s the executable name not quote unquote the name of the program so we need we need to know the executable name in
order for that to work do we need the path as well no no because it’s looking at all running programs and says hey let’s find something thatyou know has so make sure you get it copy that’s a really great idea what you just did there that’s awesome and what i would do is after the line 1566 just to test it once let’s do a message box of window just to confirm you know it worked okayso if i do there right now the other thing i see that there’s a class here what does this class refer to here
in your because the the parent class which would have been youri think it’s the rb underscore canvas pane but not the number see i don’t think we want the number but we can try it try it with the number and then delete the number if it doesn’t work can we leave it without the ak class no because that’s what it tells it what what you mean both without both no we need different light blue if you looked when we did when we did our test here when the class didn’t come back yes it came we we managed to see that the
sizes were the same so we knew that the path was correct and it was identifying the program with just the aka id because the size of the window reported was correct it failed on getting thethe other bits and pieces let’s let’s run it there and see what we get it’s the easiest way to do itand we’ve got a message box x y basically coordinate for winner what was the window title did it show yes it showed the window title as being the full window title of the program wellmessage box window when activate
window and it’s yes xy i don’t believe you need to activate it by the way for for the okay that’s what you had so i’m copying your codeand i need here to put the message box with thex y there we go and we call this window right so we run it okay see this is a good example of every time you run it it’s doing other stuff right which just distracts you yeah just fyi wellthe reason why i run it is because of the little yellow triangle is my test bed when i press it it just runs that routine
okay yeah but you could easily have Auto little script in its own thing with theHotkey that you hit and it runs it yes yes directly right yeah anyway that’s fine so this is a window aka h that’s the title of the window that to me looks unless you type that that looks like the straight text did you have a percent after the message box i believe i did and there’s a position that it’s come out with but that’s a second position oh i did find that it it did find a position so let’s try that again it’s come up with a
position of 0 54 okay it’s a wrong position oh it’s at least just come back with the value it’s it’s a different position yeah but it was blank yeah but my point being it might be relative to the screen and the other one is to your desktop i’m just saying it might actually be accurate it’s just you know using different coordinates so back to back to so every time i hit the yellow button this is what it runs basically yeah okay so let’s look and see what we have herethe window is that lot
you can i can comment at 156 1556 or whatever it was the message box we don’t one five six six we don’t need that anymore right it seems to be working so there’s no reason to pause on itso x y is the new we put the word coordinationlocation i don’t know what zero refers to for that we would have to go into and actually in studio so double we’ll actually click on the acc get so and then hit alt f1 are you in it are you click on the acc gap i’ve done it and it’s taken me to the function
there it is can you see it no you must have shared just this window so we don’t see it i thought i shared the screen okay now we see it i don’t that was like a 10 second delay yeah it’s a delay it’s a delay don’t forget we’ve got storms here we’ve got all sorts of things so let’s lookcommand child path child path child id win title win text exclude so the win title here i presume is a standard ultra hockey win title which can be eitherum whatever wind spy shows up as a oh we’ve done that that’s the window
we don’t know i mean it could we have to follow through so this is the function then we have to go look how they used it right like they could have used it many different ways but okay sois i think we’ve got the the command right we’ve got coordinates come out i don’t think we’ve got the rightsub window within the main window i think our path is wrong and if we go back to is there a way of jumping to where you were before yeah alt left arrow awesome you know what that has saved me so much time oh
studio is great for getting around it takes a little practice so alt left arrow and that was the the to get to the function was it’s alt f1 that one i had to i literally wrote down like this isn’t it but just to get an idea on some of these i put little stickies and you know write it and put it on my screen because i’m like i just can’t you know until i remember it and then i tear them down once i finally get it i’ve got a stream deck i’ve got a stream deck so i can just program the keys
whenever you go first you know which is brilliant okay so i think my coordinates are wrong there because it’s it’s ending up in the wrong place if it’s going to the main window might want 14.18 right exactly that’s what i was going to say and what we don’t know if it’s the 0.
18 or comma one eight and this is where alsowell i’m looking here and you’ve used dots so well that’s what i said mine is dots right but who knows what you’re using there was one that had commas okay i think i remember reporting it to jethro this is a long long time ago and i said you know mine doesn’t work but when i use commas it works and if i remember it was him or someone else said i have no idea how that would be possible and i’m like i don’t know but it doesokay well if you have a look thethe acc viewer reports a position of of
that pain 619 as 403 by 1322 okay thewhere’s it gone the the new iteration as a reporter or position but look look look go back to your thing on the right and look look at the bottom where it says location there’s two locations there’s position and then location and this is spot on that is spot on that’s because we’re getting location cool so if i wanted to ocr that location would i be looking at the position of the location i it just depends i think both are fine you just have to understand how you’re going to use them
okay so if we’ve i i think we’ve had a look and come to the conclusion that programmatically we can’t find the value of what’s in there i i disagree somewhat with that not entirely but it looks like i agree it looks like it’s not available but personally i would try a little harder but it’s okay okay soi’m happy that we’ve identified programmatically that particular section of the screen here you know what hold on now actually did i give it to you i thinki have an executable and since we’re in
zoom i think i can share itit’s from i think microsoft let me find it though you’ve got you’ve got an ocr that works in windows 10. however i have a little program that i picked up a AutoHotkey program that does the same thing and it’s calledit’s called capture to text and i i can run it in the command line giving it all the characters i need to put the content of that into clipboard hold on a second okay i’m gonna put a file what into thechat which i think i thought it was you but
maybe not maybe maybe it was on a different live stream and there was something else it’sit’s i zipped it because it wouldn’t let me give you an executable this is a tool for microsoft i i think it was microsoft yeahwhich allows you to use the the acc approach in the ui approach and i just wanted because if this one can’t find the text then then i’d say i agree programmatically we can’t usethe the straight up approach to getting the text okay well it’s running now and john there’s a question in the chat
you’re better with gooeys than i am anyway buti don’t know if you want to try to reply to him to color so here is thehere is the whoops it’s for some reasonit’s doing funny stuff it shut down my crm so i’m gonna have to relaunch my crm [Music]and it means that it means that that number that that would change okayi’ve got an error now i don’t know why i’ve got that errorcan’t create control okay nope
okay so for some reason i can’t create control there’s something wrong gone wrong in my main script hererestart it there we go that’s fine right so it’s yeah[Music] there we go it because of then the name has changed now the other method doesn’t work so if we go and inspect to see what the new name of it now it’s control panel five eight four so if i change that to five eight four then i know that it’ll work okay now let’s look at the new program that you havesent me it’s inspect and i’m inspecting the crm
is that correct how how am i inspecting it well so see on the left where this says msaa and it’s a drop down and you can choose between that and the ui which i forget what it is yeah so ui automation so we’re gonna we can use the msaa as the accessibility approach okay right but just for why it does both which is what’s really cool okay but so going and maybe there is a huge delay but if you get it back on theum msia and then it works similar in that sense you you cannot well you can turn on like the
outline to the right one more so what am i trying to do the the rectangle yep and again yeah is it is it the mouse i need to do well keep go to the right a couple more there’s like three or four different ways that it’ll show you what’s under there you got a tooltip will be fine so to the right of that one one more there you go i think that’s a tool tip kind of thing so click that and then when you’re over it just wait it should huh well you can try the try the two to the right try one and then try the other put
it i think this is it puts into the tool tip watch tool tipswatch cursor watch carrotwatch focus focus area try one of the other options to the right of the tooltips okay what’s this one show highlight rectangle there you go that’ll that’ll help yeah now when you go down that should have been on and that there we go so see now our record now now that we’re on that do we see one record anywhere i don’t see it which this gets back to i would agree if this can’t see it we can’t we’re not
gonna be able to using the acc approach to see it however just for fun because we’re here change that drop down from the msaa to the ui automation and depending on how old your crm is now just go back and click back down on the one record anyone let me okay and it so maybe your is your program maybe a little older do you knowi know my program has been around for a few yearsand i don’t know how old it is well i know it’s been at least 10 years okay so for whatever reason itit’s it you can’t which is really
weird because usually that ui automation like it gets every like so much it’s great but for whatever reason in this tool it’s not getting anything so oh wellcelebi yeah okay exactly i know i know now thatwell now it’s actually where i would i’d reload the inspect tool okayreload the inspect tool okay it seems to be act a little weird that’s all so maybe the the ui automation didn’t work because it was just freaking out okay saying there’syeah don’t worry about that
it’s fine that’s fine okay it’s just saying it’s caesar’s conflicting Hotkeys already in existence so that’s fine we don’t need that we don’t need that we just need to watch the show highlight rectanglehow do we select that rectangle how do we selectbut we don’t want that that’s it that’s one it just takes a while yeah and then go ahead and shift it back to the ui automation just one more try and if this doesn’t work then fine and then sure yeah and then yeah but it’s
it whatever reason is it it can’t find in this program which is fine because unfortunately we don’t have a programmatic way which is one i’ve tried working on but it’s very complexa programmatic way to get it from the ui automation so anyway let’s not worry about it but i i will agree with you we can’t programmatically get the the text there unfortunately but we have a system now to know how to get it if we have to okay which is perfect here’s the thing like if if you can what i don’t know is
let’s see if if the word like class because see correct me if i’m wrong if we could return the class of what is there then you can use your second approach reliably if we can programmatically return that class right to where it’s always dynamic and getting updated then you can use your second approach we don’t have to do the ocr what’s this solet me shut down studio okay shut down this lotthere’s a lot going on here we need to shut down okay so we’re back on the record i’m gonna bring
up youraccount viewer and show more show that bring that to that oops my apologies let’s try that again drag that to there it’s happy it says path fourif i take it up to herechild count five but earlier on we found out that it was 4 18 wasn’t it to get to there and we did it by drilling down the main structure all the way to say it’s 4 18 okay sothis incarnation that thewe’ve got the coordinates now the question is we just need to read those coordinates yeah perhaps you didn’t hear what i said
though is is go go back to the Hotkey code and i want to point out something so this this is where it’s this is also why i like i don’t even dabble in it it’s pretty complex right what we’re doing see on line 1570 where you’re getting location and the first thing i would say is like hey maybe we can getwhat was the one you actually said you thought was quote unquote rightposition like we might be able to use position where location is to get them to be the same as what you had in the
other one however what my point is also is if we can return back the class n n and it actually had the dynamic value that the chain with the numbers awesome then then it takes out for that ain’t great and we don’t need to mess about with yeah right right okay but i don’t know if that’s a method so methods inside functions and cloud like those are things that actually like to do something and they’ll go read a value right they might not have a method for getting the class but it’s worth trying
yeah now i tried to usethe class as you can see down herei tried to get the valueprogrammatically and i couldn’t soyeah hold on so online 15 sep just just for give me five minutes right online 1570 duplicate it because we know that works right nowchange that well sure and why don’t you run that let’s actually do a message box after the xy the first one oh there you go that’s even better good and then do a message box with x y and x y p just for curiosity’s sake to see right that’s the first one that wasn’t
where i was going but this is still fine to do as a quick test hmm now i know thatokay the second the second part won’t work but this will work fine okay so we’ve got location we’ve got nothing for position so position isn’t a thing can you see it yeah it’s tiny but yeah how do we make the font bigger
let’s not worry about it soposition isn’t a thing well it’s not as a word it might be pos and this is where peeking inside the actual acc get we could figure it out but for now just try pos real quick instead of position because if anything i’m pretty sure that’s what it would be and just rerun nope okay so the other one though i was thinking and and what would be better is just let’s go into the acc get function so double click on it or just don’t beat it alt f1 and that’ll jump to
it and then in five minutes i’ll see it oh and actually did it right away so so let’s look at the cmds where are the cmd options here so see did you see the location on line 176 so so that’s that was for location oh boy so there’s not many right but i thought role was or value was also one as well sowe’ve got object we’ve got location we’ve got cmd equipment why do you actually roll let’s date child count russian focus yeah acc command not implemented so unfortunately i don’t i was hoping to
see control here but let’s return object what was it what what’s this acc location what’s this this looks interesting that’s the location that’s for location yeah that’s getting the location that’s how it’s programmatically doing it and see how like to me this is i’m not gonna say gobbly but it’s it’s very advanced to what they’re doing yeah yeah yeah okay but that htc obj mm-hmm let’s changeis that the actual command no object sorry object is what we want so let’s
put in object so go back to alt left arrow see the one right above that where it says object anyway it’s fine so instead of position get object and then what we’re going to want to do is we need to peek inside that now the thing is objects they’re not text they’re structured data okay so we can’t just display them now do you have matrix m function i think it’s built into studio so online 1572 put m and then the left paren and just let’s do x y p since that’s what you have is stored as the line
above and now just go ahead and run it let’s see it may it may not run if you don’t have that function but hopefully i think studio has it built into it’s not going to be down there that anyway so you don’t have it unfortunately but let melet me give it to you because it’s an amazing function very very very handy what is it it’s emma nana what what what does it do it just allows you to display text or objects and iterates over them andwill parse them for you so i put it in the chat
okay so i’m gonna download it and do you know about your library right if you put it in your library folder you won’t have to use an include okayso here it is and i want to use an include mainly becausethen i know if i ever transport that code what libraries i’m using well studio you can you can do alt m and say publish yeah it will go cool all of your includes or even if it doesn’t have an include if it’s leveraging it it’ll pull them and put them all on the clipboard for you but anyway okay that’s how i
avoid that okay so do i need when i do an include if it’s in the library i need toand you don’t need to include it okay so let me include it because that way i don’t know where my library is it’s just there’s actually three places AutoHotkey automatically searches so it’s just it is a little more complex right yeah okay so by pathand [Music] and i’ve got to put it inremember those double quotes right done okay so re-run it oh what’s this abort retry ignore clipboard exit nice
win never seen this before so for whatever reason there’s not much in the object oh that’s the object okay yeah that was what was in there but it was like nothing so okay let’s try this again okay that’s running theis there a way of running from the okay so i’m in the edited file but saved inhow can i run this without finding the icon and double clicking on it alt r is that run the code from the file or from the memory here i don’t know what you mean by memory also that’s what i get
is that the function m well it’s using the function m if you had a big object that had a lot of data in it it would show it all broken out or if you had text it would just show it but that’s a bummer i thought it was going to have a lot of information maybe it’s the path we’re getting this doesn’t have a lot i don’t know that’sum it doesn’t like thei’ve i’ve not seen this window before is it because of the include web window so that comma there okay soif i run i’ve got nothing running at the moment
awesome i get this and this must be the function it is and it says nice that’s that’s what’s stored in the object apparently but i don’t believe it’s we’ve got oh you know what now hold on i thinkwe’ve not activated that function so why is it coming up let me see go edit the m function i think it it might have although i don’t know how mine’s doing it then yeah that’s actuallycomment out the first three lines in it okay okay you can do that and [Music] why did i put it no it’s the wrong
folder the library there’s m right there we go get rid of thethe first three lines yeah yeah just comment about and save and then go back and do what you were doing yeah okay i knew there’s something dodgy happening that okay we’re running running press a button right this is we get unknown name in the fileit doesn’t like something in m yeah
i’m i’m saying xml which that’s weird let me see if so i grabbed that from my library but there is see there’s another there like i said there’s three spots where your library is right and maybe i have a different one in my different library okay give me the right one well yeah it’s just weird because i never use i i don’t even know how to it’s under your my documents like singing i don’t even well just just search m.a.k.
h and see what’s available you were gonna is it in your big zip file of stuff oh no because this is much newer that other stuff is old okay well you know what what what we’re doing here it’s not rocket science it’s it’s age old stuff it’s not brand new i’m sure other people have the same issues they must have come overcome them somehow oh i have one in my my studio folder well that looks
what well you gonna send me the right one no well i don’t know 379 lines and same same number line so that’s those two are probably very likely the same that’s the same object to string this m function is packed yeah it does a lot that’s why when you ask what does it do oh oh oh this is this is a different one but i think because and i think this might be it because i’ll delete the other oneyeah this one’s a little bigger
427 2025 where that where is it located right you’ve sent it no i don’t i want to make sure it’s i i have 40 of them more 50 you know so well if you look at the date modified that will help yeah well just because it’s newer doesn’t mean it’s better truethis one they modified and they created yeah well that’s still it doesn’t it doesn’t neither one means they’re the right one let me do this let me do this i know how tolet me go in my main oneand then i’m gonna i’m gonna use studio
to jump to it oh and there’s there’s eight million examples that it wants to jump to but that is that’s the same one i i don’t know why xml won’t work for you i don’t need xml do i well it it it leverages xml okay but let me go ahead and store it on date created and see what’s recent well i’ll just we’ll we’ll go with kind of a little bit of your logic because i’m just saying hey this one’s the most recent let’s see if it’s any better because it was a 218 oh
no created yeah created today what oh this is just a backup nevermind sorry that’s a backup when you drop things into the library do you have to restart studio for it to account for it or is it a hot folderi think it it you know it would pick it up i believe okayi mean the fact it didn’t error means it found it just fine but i’m gonna give you this other one i don’t know if it’s any better i’ll open it before i am 15.
7 hold on 15.71 is what i’ve got this one let me see where this one is open folder this one for some reason was a bit bigger i don’t know why okayand i gotta find the chat where that’s okay this one’s a lot biggersignal force if okay this one’s got
a lot of stuff in it i’m gonna get rid of the first few linesit says [Music] can i get rid of line two three and four and five yeah get rid of this yeah that’s fine how about exit app that’s fine well see you’re using an include which is why i don’t have the issue butso the include forces it to come here and run the program right which is why it does that so you could just anyway just go ahead and comment it out comment this lot out here yeah start at night line eight basically secretary well it yeah which doesn’t do anything
butbecause it’s a function call right so now to save it and then make sure you include the path of this file if you if unless you change it or whatever or if you overwrite the other one great no i think it’s the same one all right let’s go for studioit’s the same path and we’re gonna restart to reload it cannot be opened okay or obviously it’s not in the right place then let’s do there we go he doesn’t like it there’s a non-existent function object a line field well object to string yeah which is
amazing you don’t have object to string in thatyeah anyway i’m i’m sadly running out of time butyou know what i do have is a a different one hold onlet me find it because i know it it’s self it’s a it’s a whole different thing for peeking inside objects it’s frustrating howit’s the process of slowing us down so we’re not actually programming we’re just working our way around the process where’s the chat again my chat just keeps it just it’s not yeah you’ve got to click on theon
yourtoolbar and it’ll pop up under three dots maybe well but there’s a way to get it to stick to the other tobe bound to the other window yeah so dump which i is dmpis so i forget who wrote it but it’sit’s for peaking inside objects as well okay okay so there we go this one should oh crap i changed mine sorry but actually i changed it for studio so it should be okay because you’re using studio i changed mine to dump it in the studio instead of this gui it would do butgo ahead and save it and include it and
then we’re going to call itwhich actually i’ll have to give you the command oh that’s the ball okay and then go back to our code that’s actually doing the call which is i think what you’re doing and now change that to wrap the m yeah perfect perfect yeah why i don’t know what to tell you is that because xy p is not an object are you what v1 point something either it’s not two it’s not v2 okay it’s a thirty-two
it’s a thirty-two bit good that’s it that’s that’s the one i highly recommend yeah okay sowhat’s that on the next line that backslash p what is that i don’t know where that came from i think wewe it seems to be a remnant from getting rid of these we had something commented out here with this lot commented out i believeyeah we had that commented out because we were testing the other bits and pieces okay let’s run that again just alt r right that’s doing it let’s have a look
at itawesome it doesn’t like the dump command something in dump it doesn’t like delta array in pa array it could be that that it isn’t an array there’s no object let’s let’s confirm yeah let’s actually so let’s go back to the script and before using it we’re going to put in the message box that says is you know message box space percent space cool i have a HotString for that just because i use it pretty regularly it’s a one okay so it is an object that’s
interesting and yet for some reason it’s breaking so i’d unfortunately i you know it broke dump and it broke m yeah there’s something weird about itit looks like it doesn’t have the thing to enumerate over the items in the object which is just a bit more advanced to get into with the time we got butfor whatever reason when you return that object it’s it is an object buti don’t know how to we it’ll take some time to be able to work with it okay wellin my and can i work with location is that good
enough well yeah i mean you can go the route that you were doing of doing ocr on that you know okay nowthat the oci worked and then it stopped working for some reason it’s not running this line yeah it stops here now i’ve got the program running already i can knock it out it’s meant to run this line is a command line for the whole thing okay and i know that works so the the if i go to the program here and i bring up window spy and then i click on this i know it’s five eight four we know that’s a fact
andso if i do the old way 584 if i take out all the new stuff that we’ve done because we know we know it partially works okay so we can take this lot out okay so it’s going to go to get the position the old-fashioned way of the of the of off this particular manually entered name okay yeah okay so and then it’s going to try sarah so if i run it now it’ll give us it’ll give us okay
it’s given us a rubbish value it’s given us a position and a location and now it’s going to try and ocr it and they didn’t work let’s look this this program puts things into clipboard [Music] clipboard so the first thing i would do is is confirm that the location that is returned from you know what we did was identical or you’re saying even the way that you used to do it’s broken no the way i used to do it works okay it brings up the correct location what it doesn’t do yes what it doesn’t do it doesn’t run
this line which it used to but it stopped which is really really annoying and i don’t understand why okay soi know that if i go to this location the the program would be there okay there is the program okay so i know the location is correct it this used to work but it stopped so let’s see these are the controls either the positions of this pane i know that if i use windows spy it’ll tell me the correct position here i’ve just clicked on it okay and it’s now a different pain which is a pain pain pardon my pain
okay ah five eight four there we go it’s window five a four andi’ve got to get that freeze sothere we go 584 we’ve got two positions we’ve got two y’s and two x’s okay four oh three one one three two two when i run the program i’ve got 403 one three two two so and the height and the width yes so i know my program is picking up the right right thing okay so i i know that the thepositions well yeah but but see right here just because this i’m not familiar with your tool like it has x403 y1322 is that how
you’re referencing them in the other thing with the x and y there or do you do you add the y and x manually okay so the way i do it is i add the width and the height to the x and the y and then i enter it those coordinatesinto the command line and it reads it and dumps into the keyboard into the clipboard but what i’m what i’m asking you are those expecting numbers or to have a y or an x appended to them at the beginning they’re expecting numbers with spaces yeah but you don’t have numbers with
spaces in your message box in your message box the thing you’re capturing the thing you displayed earlier has an x appended to the number correct that’s but that’s only a display i’m okay extending that x okay yeah so if you look at my coordinates i’m getting x y w and h i’m converting the the w a and h into another set of x y coordinates so we’ve got the diagonal corners of the rectangle and then i’m passing the the diagonal coordinates of the rectangle to the function there i know
that works it’s not running this program well i that’s not my program i don’t know yeahso in the settings here it automatically dumps it into the clipboard but it’s running now which is crazy it wasn’t running before well unfortunately i’m out of timeand and i don’t know that program so yeah i i would just again personally i would have i would bring this outside of your whole main script and just test with very specific stuff without having all the other crap and i would even force
feed the numbers instead of getting them from a variable get that to work first okay now i’m gonna you know use the variable to get it okay now that works now i’m gonna bring it back into this parent thing okay again awesome thanks everyone thank you my patients with marks yeah thank you i do think this is because there’s not a lot document on it and i honestly don’t play with it much so i don’t do many videos on it but i don’t use it much but it the acc library is a great way it’s just
complex but it’s a great way to automate things which is why i was happy to walk through all of this because it’s it’s complicated but the problem here’s the other thing is it’s different for every program right like how you’re doing what you’re doing so you can’t it’s kind of like the whole thing with com and webs like hey you know what every web page is different you can’t show one example and be good so it’s just kind of a painful thing to walk through but yeah

Comments are closed.