if you got no error, then i believe it crashed on you due to detection of key simulation.
what you will need to do is put #RunAsAdmin on line#1 in your script.
but if THAT doesnt work either , then you will most likely need to develop your own driver which i dont even know how to do yet

its pretty challenging.but once u make a virtual keyboard driver ... you can make any key presses (bots/macros)