Skip to content

Instantly share code, notes, and snippets.

@milligramme
Created July 31, 2014 23:15
Show Gist options
  • Select an option

  • Save milligramme/f51cc1584286c291a908 to your computer and use it in GitHub Desktop.

Select an option

Save milligramme/f51cc1584286c291a908 to your computer and use it in GitHub Desktop.
#include "~/private/scriptui_boilerplate/ui/index.jsx"
#targetengine "aggressive.slider"
var ui = new UI('window');
var win = ui.win;
var val = 28;
var i=0;
ui.add_panel(win, {size:[200,-1], name:'pnl'});
for (var i=0; i < val ; i++) {
ui.add_slider(win['pnl'], {name:i+""});
};
ui.add_text(win['pnl'],{text:"0000000", name:'counter'});
win.show();
while (true) {
var _id = Math.floor(val * Math.random()) + "";
win['pnl'][_id].value = 100 * Math.random();
i++
if (i>1000000) {
break;
}
win['pnl']['counter'].text = i+"";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment