Define -Translate -Synonyms of Highlighted using Copilot

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

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
; 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
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

emoji