10-12-2016, 04:34 AM
Update!
Function Translator
Function Translator
;/
str selected_text.getsel
int h
GetWorkArea 0 0 0 h
int w=win
RECT r
scan F"color:{GetSysColor(COLOR_HIGHLIGHT)}" w r 2|16
int y=r.top+100
if y+100>h
,y=r.top-100
OnScreenDisplay "Wait a second..." 10 r.left y "" 12 0xff0000 1|4|16 "my-tooltip" 0xc0ffff
str translated_text=GoogleTranslator(selected_text "es")
OnScreenDisplay translated_text 0 r.left y "" 12 0xff0000 1|4|16 "my-tooltip" 0xc0ffff
err+ OnScreenDisplay "Error"