Possible to trigger a GUI's function without using the GUI?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Coldblackice
Posts: 29
Joined: 13 Nov 2013, 14:39

Possible to trigger a GUI's function without using the GUI?

12 Apr 2015, 16:20

Is it possible to trigger a GUI's function without actually interacting with the GUI? Like "puppet-stringing" the behind-the-GUI function, essentially bypassing the GUI entirely.

For example, in Internet Explorer, pressing F12 brings up the Developer Tools pane. Inside this pane, there's a button called "Clear domain cookies" -- it clears the cookies for the current page's domain. I'm wondering if it'd be possible to trigger this function without having to press F12 and then mouse-clicking the button.

Perhaps if there was some way to "listen" behind the scenes for what's happening in memory when a button is clicked, capture that, then replay it without having to use the GUI.

Note: I'm more interested in this general ability rather than merely using the button in this IE example -- I want to avoid GUI-clicking automation. I'd love to get the ability to "hook" any program's GUI functions for my own scripts and programs, if possible. Sort've like hacking out your own API for a program.
User avatar
boiler
Posts: 16960
Joined: 21 Dec 2014, 02:44

Re: Possible to trigger a GUI's function without using the G

12 Apr 2015, 19:06

You can use a program like WinSpector Spy to see what messages are sent to the window when certain selections are made. Make sure to use a 32-bit version of the spy program for 32-bit programs, and the same for 64-bit.

It takes some time to know what messages to look for, how to filter the flood of messages for the ones that are useful, and how to trigger the same function by sending the message to the window yourself. Plus, it doesn't work for all windows. But when you do find one that works, it can be well worth the effort.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: hedehede81 and 268 guests