Hello all
I want to use AHK to do :
1- explain/define the highlighted terms
2- Translate to Arabic
3- Give Synonyms - Examples of use.
what is wrong in this code
; Example AHK script to achieve the desired functionality ; When Ctrl+F6 is pressed while text is highlighted, a menu pops up with prompts to choose from ^F6:: ; Get the highlighted text Clipboard := "" Send ^c ClipWait, 1 ; If text is not empty, show the menu if (Clipboard != "") { Menu, MyMenu, Add, Define/Explain the highlighted term, DefineExplain Menu, MyMenu, Add, Translate the highlighted into (Language - Arabic), TranslateArabic Menu, MyMenu, Add, Suggest synonyms of the highlighted, Synonyms Menu, MyMenu, Show } return DefineExplain: ; Send the prompt to Copilot Run, https://copilot.microsoft.com/ SendInput define/explain the highlighted term return TranslateArabic: ; Send the prompt to Copilot Run, https://copilot.microsoft.com/ SendInput Translate the highlighted into (Language - Arabic) return Synonyms: ; Send the prompt to Copilot Run, https://copilot.microsoft.com/ SendInput suggest synonyms of the highlighted with examples of use return
![1 star click here to know more emoji](https://community.rws.com/cfs-filesystemfile/__key/widgetfiles/5c4647e932a14e22b262d374e00bf337-d/1star.png?_=638586179634400041)