Skip to content

Instantly share code, notes, and snippets.

@mattpodwysocki
Created September 17, 2014 02:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattpodwysocki/b2c39c9fa1c9131446c7 to your computer and use it in GitHub Desktop.
Save mattpodwysocki/b2c39c9fa1c9131446c7 to your computer and use it in GitHub Desktop.
Using WSH and RxJS
function include (jsFile) {
var fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.OpenTextFile(jsFile),
s = f.ReadAll();
f.Close();
return s;
}
eval(include('C:\\GitHub\\RxJS\\dist\\rx.all.compat.js'));
Rx.Observable.timer(0, 1000).take(3).subscribe(function (x) {
WScript.StdOut.WriteLine(x.toString());
})
$ cscript wsh.js
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
0
1
2
@headinthebox
Copy link

Wish, most undervalued technology in windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment