As you just want to capture the value of the variable in any extension that opens in Notepad, I advise you to do this with javascript
.
In the .js file you should have:
var x = 10;
var y = 20;
var z = 30;
And your .html
page should have access to this .js
file. You get it like this:
<script src="arquivo1.js" ></script>
I assumed that it is in the same directory as your html.
Then just have your tags show the variables:
HTML
<p id="x"></p>
<p id="y"></p>
<p id="z"></p>
Javascript
document.getElementById("x").innerHTML = x;
document.getElementById("y").innerHTML = y;
document.getElementById("z").innerHTML = z;
If you want these values to be updated without the need to reload the page, with an interval of 3s, as you said in the question, just add this to your javascript inside the html page:
Element.prototype.remove = function() {
this.parentElement.removeChild(this);
}
setInterval(function() {
var script = document.createElement("script");
script.src = "require.js";
document.getElementsByTagName("body")[0].insertBefore(script, document.getElementsByTagName("body")[0].childNodes[0]);
document.getElementsByTagName("script")[0].remove();
document.getElementById("x").innerHTML = x;
document.getElementById("y").innerHTML = y;
document.getElementById("z").innerHTML = z;
}, 3000)