Created
September 17, 2014 02:37
-
-
Save mattpodwysocki/b2c39c9fa1c9131446c7 to your computer and use it in GitHub Desktop.
Using WSH and RxJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cscript wsh.js | |
Microsoft (R) Windows Script Host Version 5.8 | |
Copyright (C) Microsoft Corporation. All rights reserved. | |
0 | |
1 | |
2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wish, most undervalued technology in windows.