Created
October 3, 2024 17:22
-
-
Save pseudosavant/0f4d4bb2404ea2a7402abe9776dcc0ea to your computer and use it in GitHub Desktop.
Windows+Ctrl+A launch ChatGPT in a PWA (optional), starts a new chat, and pastes the current clipboard, or a screenshot of the focused window, into the chat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SingleInstance force ; Ensures only one instance of the script runs | |
; Register the hotkey Windows + Ctrl + S | |
#^S:: | |
{ | |
; Take a screenshot of the active window (Alt + Print Screen) | |
Send "!{PrintScreen}" ; Simulates Alt + Print Screen | |
; Open ChatGPT Edge-based PWA | |
Run '"C:\Program Files (x86)\Microsoft\Edge\Application\msedge_proxy.exe" --profile-directory=Default --app-id=cadlkienfkclaiaibeoongdcgmdikeeg --app-url=https://chatgpt.com/ --app-launch-source=4' | |
; Wait for the page to load | |
Sleep 3500 ; Adjust the sleep time based on how fast the PWA loads | |
; Open a new chat (Ctrl + Shift + O) | |
Send "^+o" | |
; Focus on the chat input field (Shift + Escape) | |
Sleep 250 ; Short delay to ensure the new chat has been initiated | |
Send "+{Esc}" | |
; Paste the clipboard content (Ctrl + V) | |
Sleep 100 ; Short delay before pasting | |
Send "^v" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SingleInstance force ; Ensures only one instance of the script runs | |
; Register the hotkey Windows + Ctrl + A | |
#^A:: | |
{ | |
; Open ChatGPT Edge-based PWA | |
Run '"C:\Program Files (x86)\Microsoft\Edge\Application\msedge_proxy.exe" --profile-directory=Default --app-id=cadlkienfkclaiaibeoongdcgmdikeeg --app-url=https://chatgpt.com/ --app-launch-source=4' | |
; Wait for the page to load | |
Sleep 3500 ; Adjust the sleep time based on how fast the PWA loads | |
; Open a new chat (Ctrl + Shift + O) | |
Send "^+o" | |
; Focus on the chat input field (Shift + Escape) | |
Sleep 250 ; Short delay to ensure the new chat has been initiated | |
Send "+{Esc}" | |
; Paste the clipboard content (Ctrl + V) | |
Sleep 100 ; Short delay before pasting | |
Send "^v" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment