Searching keywords in google in ahk Topic is solved

Ask gaming related questions (AHK v1.1 and older)
tomaxtoro
Posts: 16
Joined: 12 Dec 2020, 07:18

Searching keywords in google in ahk

Post by tomaxtoro » 31 Jan 2023, 14:15

This is my whole script

Code: Select all

#Persistent
   #MaxHotkeysPerInterval 99000000
   #HotkeyInterval 99000000
   #KeyHistory 0
   DetectHiddenWindows, on
   ListLines Off
   Process, Priority, , A
   SetBatchLines, -1
   SetKeyDelay, -1, -1
   SetMouseDelay, -1
   SetDefaultMouseSpeed, 0
   SetWinDelay, -1
   SetControlDelay, -1
   SendMode Input
   FormatTime, timestamp,, dd.MM
   CenterX := (A_Screenwidth // 2)
   CenterY := (A_ScreenHeight // 2)
   RegionX = 45 ;Define Top Left Corner Region for Drop Zone
   RegionY = 100
   RegionW = 150 ;Define Bottom Right Corner Region for Drop Zone
   RegionH = 150
   Gui, +HWNDhMain -border -caption
   Gui, -caption +AlwaysOnTop
    gui, color, white
    gui, font, s12
    Gui, add, edit, vSearching y5 w153 h20 -vscroll -E0x200, 
    gui, add, Picture, x205 y1 w105 h27 gSearch, %A_ScriptDir%\Images\search.png
    gui, add, Picture, x0 y0 w200 h30, %A_ScriptDir%\Images\seachbar.png
    Gui, show, w468 h46 , Google overlay
    WinSet, Region, 0-0 200-0 200-100 0-100 0-0  w468 h46 R40-40, Google overlay




OnMessage(0x0201, "WM_LBUTTONDOWN")
Gui, Dropper: Show,,WM_LBUTTONDOWN Drag



Return

Search:
Run https://www.google.com/search?q=%Searching%
Return

Return



WM_LBUTTONDOWN(wParam, lParam, msg, hwnd) { 
   global hMain
   If (hwnd = hMain)
      DllCall("PostMessage", "uint", hWnd, "uint", 0x00A1, "uint", 2, "uint", 0)
}
return
return
Leave:
   WinMinimizeAllUndo
   Exitapp
return


return

Esc::
Exitapp
But i just want to make so the Search: works

User avatar
mikeyww
Posts: 26939
Joined: 09 Sep 2014, 18:38

Re: Searching keywords in google in ahk  Topic is solved

Post by mikeyww » 31 Jan 2023, 19:00

Code: Select all

#Requires AutoHotkey v1.1.33
Gui +AlwaysOnTop
Gui Font, s10
Gui Add, Edit, w300 vfind gCheck
Gui Add, Button, x+m Default Disabled, Go
Gosub F3

F3::
GuiControl,, find
Gui Show, x1000, Search (F3 = show again)
Return

Check:
Gui Submit, NoHide
GuiControl, % find = "" ? "Disable" : "Enable", Go
Return

ButtonGo:
Gui Submit
Run https://www.google.com/search?q=%find%
Return

Post Reply

Return to “Gaming Help (v1)”