I'm using a library "justgage.js" to place a graph "GG1" on a webpage, and the values of that graph can be updated or refreshed with a property called refresh so executing gg1.reflesh(33,1,100) in JS would update the value of the graph and change max and min values as well. In JS I use a function called "update" (see function at the botton of the JS code below) to pass those values for the graph to use. So far so good the webpage work as expected when I run from AHK using neutron gui. What I can't seem to do is to be able to pass those values from AHK/Neutron to the JS function.
So basically I want to pass val,min,max to the update function.
I tried neutron.wnd.update(110,500,100) command but that didn't work. So I'm at a loss as to how to achieve that. Any help would be greatly appreciated.
Code: Select all
HTML code...
<script>
$(document).ready(function() {
// window.alert("Execuring Script"); // test to figure what is executing first
//setup JustGage
var dflt = {
min: 0,
max: 99,
//donut: false,
// gaugeWidthScale: .5,
counter: true,
hideInnerShadow: false,
symbol: '%',
label: 'Free',
valueFontColor: 'deepskyblue',
valueFontFamily: 'Rajdhani',
decimals: 1,
pointerOptions: {
toplength: -8,
bottomlength: 8,
bottomwidth: 5,
color: 'blue',
stroke: '#ffffff',
stroke_width: 2,
stroke_linecap: 'round'
},
customSectors: [{
color: 'red',
lo: 0,
hi: 10
}, {
color: 'yellow',
lo: 11,
hi: 45
}, {
color: 'green',
lo: 46,
hi: 100
}],
}
var gg1 = new JustGage({
id: "gg1",
color: 'dodgerblue',
formatNumber: true,
label: 'Free',
symbol: "Gb",
donut: false,
valueMinFontSize:8,
counter: true,
defaults: dflt
});
function update(val,mx,mn) {
gg1.refresh(val,mx,mn);
};
update(300,500,100)
});
</script>