I am working on a Batch/HTA hybrid file and want to add some background music to the application. When I try to add a url (containing a percent sign) to a<bgsound> tag, it doesnt play anything. I got it working in another application where the url didn't have any percent signs.
<!-- :: Batch section
@echo off
setlocal EnableDelayedExpansion
start "" mshta.exe "%~f0"
exit /b
-->
<html>
<head>
<HTA:APPLICATION SCROLL="no" SYSMENU="yes" >
<title>ACNH - Time Travel Date Selection</title>
<script language="JavaScript">
window.resizeTo(1280, 720);
</script>
</head>
<body>
<div class="wrapper">
<h1>Testing audio...</h1>
</div>
<bgsound src="https://vgmsite.com/soundtracks/animal-crossing-new-horizons-2020-switch-gamerip/pdjxvsymlc/3-02%20Get%20Ready%20for%20Your%20Flight%21.mp3">
</body>
</html>
I tried adding double percent signs to make batch ignore it but it made no difference. I'm not sure how to escape these characters in the html section
As stated in OJBakker's answer:
one inconsistent workaround was to use this instead:
The final solution was found by LesFerch:
basically I was defaulting to IE-5. Adding this changes it to IE-11
I now had access to the
<audio>tag and used that as a solution