Re:Learning to code vs. learning to automate
by ibly31 on Sunday December 08, 2019 @04:17PM
(#21738370)
I have limited experience with Keyboard Maestro but I do have some with AppleScript. It lets you do as you described, get windows, titles, UI elements. However this only works on native apps, you cant, for example, click a button on a webpage with a CSS selector or by scanning pixels of the window, ad far as I know. Can AHK do that? That would be super useful
Re:Learning to code vs. learning to automate
by nickjj on Sunday December 08, 2019 @04:44PM
(#21738562)
While I've never done it, AHK seems to have an API for being able to interact with DOM elements.
Check the marked answer here: https://stackoverflow.com/questions/49516638/ahk-web-element...
The above answer shows both navigating to a new page that isn't open yet or interacting with an already loaded page based on the title of the tab.
Re:Learning to code vs. learning to automate
by vasili111 on Sunday December 08, 2019 @05:30PM
(#21738877)
You can use Selenium with AHK. https://www.autohotkey.com/boards/viewtopic.php?t=32323
In your case, from my limited understanding it would be no problem to identify a specific button in an app and then interact with it because you would be hooking into the app's low level window title / class / handles.
AHK comes with a "spy" tool where you can just move your mouse around and it gives you low level details about every window, and then you can write AHK scripts that interact with those things.
The script would look something like:
That would click the OK button in a window that has a title of "My Cool App". If you Google around for "auto hotkey, click button in app" you'll find a ton of examples.