how to detect the current browser

Post your working scripts, libraries and tools for AHK v1.1 and older
partof
Posts: 110
Joined: 16 Jan 2016, 08:38

how to detect the current browser

05 Aug 2019, 04:39

Find the browser in a code that works specifically on google docs (pressing alt+q) :

Code: Select all

#If WinActive("Google Docs ahk_class Chrome_WidgetWin_1", Tweaks) 

    !q::    

    ; find the browser
        browser = none
        If winactive("ahk_exe msedge.exe")
        {
        browser = Edge
        ; msgbox u're on edge 
        }
        If winactive("ahk_exe chrome.exe")
        {
        browser = Chrome
        ; msgbox u're on Chrome 
        }

        If browser = none
        {
        msgbox ahk doesn't recognized the browser
        }

   Return


#If ; reset winactive

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: ositoMalvado and 173 guests