Last active
December 30, 2015 07:39
-
-
Save keimina/7797064 to your computer and use it in GitHub Desktop.
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
[js] | |
//Be careful. It seems completely emulate key press. | |
//You need Execel app to run this code. | |
var shellApp = new ActiveXObject("Wscript.Shell"); | |
var ex = WScript.CreateObject("Excel.Application"); | |
shellApp.appActivate("C:\\Windows\\system32\\cmd.exe") | |
ex.ExecuteExcel4Macro("CALL(\"user32\",\"keybd_event\",\"JJJJJ\",164,56,1,0)"); | |
ex.ExecuteExcel4Macro("CALL(\"user32\",\"keybd_event\",\"JJJJJ\",32,57,1,0)"); | |
ex.ExecuteExcel4Macro("CALL(\"user32\",\"keybd_event\",\"JJJJJ\",32,57,3,0)"); | |
ex.ExecuteExcel4Macro("CALL(\"user32\",\"keybd_event\",\"JJJJJ\",164,56,3,0)"); | |
shellApp.sendKeys("ep");//Pasting clipboard text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment