ecornell / ai-tools-ahk

AI Tools - AutoHotkey - Enable global hotkeys to run custom OpenAI prompts on text in any window.
MIT License
49 stars 7 forks source link

Telegram input #4

Closed miztizm closed 11 months ago

miztizm commented 1 year ago

I tried using Telegram input, but I encountered an error when attempting to replace the text.

image

image

miztizm commented 1 year ago

Ok i only found this way:


    } else {
  ; Check if the active window is Telegram.exe with the specified class and PID
  If WinActive("ahk_class Qt51510QWindowIcon ahk_exe Telegram.exe ahk_pid 16512") {
    ; Perform actions specific to Telegram.exe
    A_Clipboard := text
    Send "^v"
  } else {
    ; Activate the active window and paste text
    WinActivate _activeWin
    A_Clipboard := text
    Send "^v"
  }
}