Hmm.
It gave me an error about procedure not being defined on the line:
js code:
var l = Interop.Alocate('user32', 'GetWindowTextLengthW', hWnd);
I fixed that, it's actully:
js code:
var l = Interop.Call('user32', 'GetWindowTextLengthW', hWnd);
Just posting this for anyone else that wants to use this post as a reference.