title: How to swich html files
body: <p>I use the following script that I open as a hyperlink from PowerPoint. By the script a full screen .HTML file is opened. Is it possible to add to the script that after pressing a key on the keyboard opens another .HTML file? Many thanks.</p>
  <pre><code>Set WshShell = CreateObject(&quot;WScript.shell&quot;)
  WshShell.run &quot;cmd /c &quot;&quot;C:\Program Files (x86)\Mozilla Firefox\firefox.exe&quot;&quot; -kiosk file:///C:/Users/HP/Desktop/prezentace/file.html&quot;,0,False
  </code></pre>
  <p>After advice:</p>
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;script&gt;
  Set WshShell = CreateObject(&quot;WScript.shell&quot;)
  WshShell.run &quot;cmd /c &quot;&quot;C:\Program Files (x86)\Mozilla Firefox\firefox.exe&quot;&quot; -kiosk file:///C:/Users/HP/Desktop/10_semestr/diplomka_prezentace/file.html&quot;,0,False
  document.onkeypress = function (e) {
      document.location=&quot;https://google.com&quot;;
  };
  &lt;/script&gt;
  hit any key and go to Google
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>I got this error: a command was expected, the mistake during the compilation.</p>
  <p><a href="https://i.stack.imgur.com/tMcSr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tMcSr.png" alt="enter image description here" /></a></p>