Newbie - capturing actions to automate Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
Eskimo007
Posts: 3
Joined: 15 Mar 2020, 10:30

Newbie - capturing actions to automate

15 Mar 2020, 10:56

Installed ahk on Win10 PC (current version) because I want to automate a series of actions I have to do in Edge browser. I started to look at some tutorials on YouTube, but I feel there must be a kind of macro recorder I can start with and modify its results. Did a lot of programming in the past, so familiar with most concepts. Looked at WindowsSpy which seems to show me what coordinates the cursor is at, but if it's a macro recorder, it beats me how to see and modify what its recording.

Can anyone point me in a suitable direction?

basically, from a given maximized window in Edge, I want to click a button, which will cause another window to open, click a button in that window, etc. eventually to enter a string in a field and save, then housekeeping closing some windows.
User avatar
boiler
Posts: 5249
Joined: 21 Dec 2014, 02:44

Re: Newbie - capturing actions to automate

15 Mar 2020, 21:47

WindowSpy is not a macro recorder. It provides information that can be used in macros/scripts that you would write. Although there really isn’t a macro recorder for AutoHotkey that I know of (although Pulover’s Macro Creator has been found to be helpful to some), writing simple scripts in AutoHotkey isn’t too difficult, especially for those with some programming experience like yourself. I recommend the tutorial from the above title bar to learn the basics. Reading through the documentation on the available commands is also an excellent way to learn AHK’s capabilities and syntax.
SOTE
Posts: 1020
Joined: 15 Jun 2015, 06:21

Re: Newbie - capturing actions to automate

16 Mar 2020, 02:47

There is a simple macro recorder made by Feiyue, that I think is good. https://www.autohotkey.com/boards/viewtopic.php?t=34184(Mouse And Keyboard Macro Recorder). You might also want to look at ImageSearch (https://www.autohotkey.com/docs/commands/ImageSearch.htm), PixelSearch (https://www.autohotkey.com/docs/commands/PixelSearch.htm), and another program by Feiyue called FindText (Download-https://www.autohotkey.com/boards/viewtopic.php?t=17834|How to use-https://youtu.be/aWRAtvJq9ZE)

Also what version of Edge are you using? Microsoft now has a new Edge browser that is Chromium based (https://support.microsoft.com/en-us/help/4501095/download-the-new-microsoft-edge-based-on-chromium). If you have the new Edge, you might want to take a look at Chrome.ahk (https://www.autohotkey.com/boards/viewtopic.php?t=42890). As was made for Google Chrome, don't know how well it will do with the new Edge, but might be worth trying out.
gregster
Posts: 4471
Joined: 30 Sep 2013, 06:48

Re: Newbie - capturing actions to automate

16 Mar 2020, 03:04

SOTE wrote:
16 Mar 2020, 02:47
As was made for Google Chrome, don't know how well it will do with the new Edge, but might be worth trying out.
I tested it with the Beta version of the new Edge Chromium some time ago. I didn't do much, but what I tested, worked.
I heard from one user that it also works with the final release.

Of course, you need to change a path or two in the source (so that it looks for Edge instead of Chrome) or just tell it the Edge file path explicitly while calling New() (fourth parameter).
Eskimo007
Posts: 3
Joined: 15 Mar 2020, 10:30

Re: Newbie - capturing actions to automate

05 Apr 2020, 11:17

boiler wrote:
15 Mar 2020, 21:47
(although Pulover’s Macro Creator has been found to be helpful to some)
Thanks for that reply. I looked at a tutorial from Pulover and it looks very useful for me learning what I need to do my project. It shows me how to click buttons and enter text in fields, which I will need. I see in the future how I will also need to learn enough about the language to be able to loop trough some actions. More to the point, I have a list of extensions for a given tenant of my VoIP provider, and i want to iterate trough a variable number of extensions (each tenant has a varying number of extensions) and perform some actions iterating trough the list of extensions. I'm going to have to figure out how to know how many entries there are in the list to tell my loop control, tons of fun. Just a bit scared by how long it will take me to achieve my goal. Might be worth contracting it out! Much as I like to learn, I could get the job faster and learn by studying the AHK code.
Eskimo007
Posts: 3
Joined: 15 Mar 2020, 10:30

Re: Newbie - capturing actions to automate

05 Apr 2020, 11:47

boiler wrote:
15 Mar 2020, 21:47
WindowSpy is not a macro recorder. It provides information that can be used in macros/scripts that you would write. Although there really isn’t a macro recorder for AutoHotkey that I know of (although Pulover’s Macro Creator has been found to be helpful to some), writing simple scripts in AutoHotkey isn’t too difficult, especially for those with some programming experience like yourself. I recommend the tutorial from the above title bar to learn the basics. Reading through the documentation on the available commands is also an excellent way to learn AHK’s capabilities and syntax.
Like in the attached screenshot, not sure how I would determine how to go trough each entry (They all have the same icon to the right of the line)
tenant.jpg
tenant.jpg (84.12 KiB) Viewed 261 times
User avatar
boiler
Posts: 5249
Joined: 21 Dec 2014, 02:44

Re: Newbie - capturing actions to automate  Topic is solved

05 Apr 2020, 11:58

Eskimo007 wrote:
05 Apr 2020, 11:47
Like in the attached screenshot, not sure how I would determine how to go trough each entry (They all have the same icon to the right of the line)
You would keep track of the y value of the last found image, and next time through the loop, you start the search a little lower so it finds the next one. That’s assuming you do it via ImageSearch or similar. If you use chrome.ahk adapted to the Edge browser, you would loop through the button/icon elements identified on the page.

Return to “Ask For Help”

Who is online

Users browsing this forum: JackMa, rpgfreak128 and 264 guests