Both VBScript and JScript cannot call Win API functions by themselves. However, a third-party ActiveX DLL (that exposes an object that you can instantiate in VBScript) might be able to do it for you. You may want to Google that option.

If you don't mind converting your VBScript code to a more capable scripting language, then you might want to try AutoIt or AutoHotkey.