how to detect the current browser

Post your working scripts, libraries and tools
Posts: 95
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) 


    ; 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


#If ; reset winactive

Return to “Scripts and Functions”

Who is online

Users browsing this forum: DataLife and 87 guests