I have an Autohotkey script which I use on my Windows 10 computer to search Google.
Can I do this on Linuxlite with UI.Vision?
Here is the script.
global MySearch
Gui, Margin, 9, 10
Gui, Font, s12
Gui, Add, Edit, vMySearch w400 -WantReturn
Gui, Font, c999999 s7
Gui, Add, Text, Y+3, Press twice to hide/show.
GuiEscape:
Gui, Hide
#ifWinActive Google Search
NumpadEnter::
Enter::
submitSearch()
return
#IfWinActive
Ctrl::
KeyWait, Ctrl
KeyWait, Ctrl, D, T0.12
if ErrorLevel = 0
{
if WinActive(“Google Search”)
Gui, Hide
else
Gui, Show, Google Search
}
return
submitSearch(){
Gui, Submit
searchURL := “Google” . urlEncode(MySearch)
Run, %searchURL%
GuiControl, MySearch
}
urlEncode(url){
VarSetCapacity(Var,StrPut(url,“UTF-8”),0),StrPut(url,&Var,“UTF-8”)
While Code:=NumGet(Var,A_Index-1,“UChar”)
Res.=(Chr:=Chr(Code))~=“[0-9A-Za-z]”?Chr:Format(“%{:02X}”,Code)
return,Res
}