-
-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathhelloworld.js
More file actions
36 lines (28 loc) · 955 Bytes
/
Copy pathhelloworld.js
File metadata and controls
36 lines (28 loc) · 955 Bytes
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
35
36
var SYS = require("lib/system");
var HTTP = require("lib/http");
function main(args) {
console.log("Hello world");
if (typeof WScript !== "undefined") {
console.log("Process version:", SYS.getProcessVersion());
}
try {
var web = HTTP.create();
console.log(web.userAgent);
} catch (e) {
console.error("lib/http: Something wrong");
}
console.error("Muted:", console._muted);
// test htmlfile
var htmlfile = CreateObject("htmlfile");
console.log(htmlfile.parentWindow.navigator.userAgent);
// test SHA256 hash
var hash = __hash_dotnetfx_managed__("Hello world", "sha256");
console.log("Hash:", hash);
// test confirm dialog
var result = UseObject("WelsonJS.Dialog", function(dialog) {
return dialog.Confirm("Do you want to continue?", "Confirmation");
});
console.log("Confirm result:", result);
sleep(100000);
}
exports.main = main;