-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathUI_Example.js
35 lines (32 loc) · 863 Bytes
/
UI_Example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
(function() {
var a = ActiveXObject;
var w = new a("WScript.Shell");
var f = new a("Scripting.FileSystemObject");
var e = w.ExpandEnvironmentStrings('%JSLIB%');
if (!e || e == '%JSLIB%') throw new Error("Missing environment variable '%JSLIB%'.");
var s = f.openTextFile(e + '\\default.js', 1);
var d = s.readAll();
s.Close();
eval(d);
f = s = d = null;
})();
if (typeof UI == 'undefined')
console.require('UI.js');
console.log('UI');
var ui = new UI({
window: {
name: 'Test View',
width: 500,
height: 500
}
});
console.log('UI.share');
ui.share('clickme', function() {
console.log('console check mate!');
});
ui.html('<input type="button" onclick="shared(\'clickme\')();" value="Try!">');
console.log('UI.show');
ui.show();
console.log('UI.wait');
ui.wait();
console.log('Exit');