Simplify dialog with ChatGPT

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
User avatar
Krutstugan
Posts: 22
Joined: 26 May 2021, 09:56

Simplify dialog with ChatGPT

05 Apr 2023, 19:01

Hi. I want a shortcut that copies marked text and feeds it back into ChatGPT and clicks enter.
Hitting tab x times is one way. However, the number of tabs are different each time.
Any ideas how to jump to the text input field shown below?
image.png
image.png (44.77 KiB) Viewed 446 times
joyrr5092
Posts: 41
Joined: 28 Dec 2023, 09:54

Re: Simplify dialog with ChatGPT

03 Mar 2024, 16:19

python + selenium would be better,

but in the land of ahk, there is a chrome.ahk library.
gregster
Posts: 9096
Joined: 30 Sep 2013, 06:48

Re: Simplify dialog with ChatGPT

03 Mar 2024, 22:43

joyrr5092 wrote:
03 Mar 2024, 16:19
python + selenium would be better,

but in the land of ahk, there is a chrome.ahk library.
For reference, besides Chrome.ahk, it is also possible to use AHK with Selenium (although not overly popular, I guess). Or you could use instead Rufaydium. Or possibly some kind of javascript injection (like eg teadrinker has shown in the past).
william_ahk
Posts: 502
Joined: 03 Dec 2018, 20:02

Re: Simplify dialog with ChatGPT

04 Mar 2024, 00:46

No one's mentioning the amazing UIA_Interface.ahk? It's much simpler than all above.
gregster
Posts: 9096
Joined: 30 Sep 2013, 06:48

Re: Simplify dialog with ChatGPT

04 Mar 2024, 00:56

Yeah, might be sufficient for this use case. I still haven't used UIA yet, but afaik the specialized tools can do more advanced browser automation (headless mode, automating inactive tabs, ...).
If that's needed here, or if this is all about working on an active tab, we don't really know yet. If it's about the active tab, teadrinker's technique (look for RunJsFromChromeAddressBar() or similar) might actually be the easiest solution. I think it uses Acc (accessibility) functions, so it's loosely related to UIA. Not sure, if a v2 version has been posted yet.
william_ahk
Posts: 502
Joined: 03 Dec 2018, 20:02

Re: Simplify dialog with ChatGPT

04 Mar 2024, 01:27

To be honest, it's sufficient for most of the use cases. Average users just need to automate the browser like they automate the desktop.

I've used RunJsFromChromeAddressBar quite intensively in the past and loved it. Unfortunately it needs updating recently because Chromium browsers no longer expose the address bar to Acc and we now have to use UIAutomation to control the address bar anyway. Also writing the Javascript to evaluate is more complicated than writing UIA commands. Not to mention Descolada's UIAViewer provides a macro creator which generates those commands for you. UIA should be the first choice for new users.
gregster
Posts: 9096
Joined: 30 Sep 2013, 06:48

Re: Simplify dialog with ChatGPT

04 Mar 2024, 01:35

Thank you, good to know :thumbup:
joyrr5092
Posts: 41
Joined: 28 Dec 2023, 09:54

Re: Simplify dialog with ChatGPT

04 Mar 2024, 09:18

ahk is NOT popular, and a small niche in it is EVEN more less popular. (not unpopular)

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: Google [Bot], Idge_24, kunkel321, niCode, wjt936826577 and 29 guests