The map has common browsers [Duck Duck Go has a crazy progid]. Is Opera still used much?
;Get default browser via Registry and map lookup
br = $"IE.HTTP,Internet Explorer
FirefoxURL,Mozilla Firefox
ChromeHTML,Google Chrome
MSEdgeHTM,Microsoft Edge
AvastHTML,Avast Secure Browser
AppXpyh19kydzzwwekp04n89jr0js1q527zf,Duck Duck Go$"
Browsers = MapCreate(br,'',@lf)
item = "ProgId"
If !RegExistValue(@REGCURRENT, "Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice[%item%]")
Message("Error","Item not defined- ProgId")
Exit
EndIf
value = RegQueryValue(@REGCURRENT,"Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice[%item%]")
Browser = Browsers[value]
Message("Default Browser", value:@LF:Browser)
Exit
Neat!
Nice.
You can add this to your MAP:
`BraveHTML,Brave Browser
`
What is the WinBatch name for the $" ... $" formatted strings? Are they called Template Strings, ala JS?
Quote from: cssyphus on April 29, 2025, 01:27:24 PMWhat is the WinBatch name for the $" ... $" formatted strings? Are they called Template Strings, ala JS?
https://docs.winbatch.com/mergedProjects/WindowsInterfaceLanguage/html/HTMLWIL_SC_001.htm
Thumbs-up-emoji Thank-you-emoji