Julien Allaire
Julien Allaire

Reputation: 25

batch file to make macro

I have a batch file. I putted a shortcut on the batch file which is (Ctr + Alt + 1). I want this batch file to output "Hello World!" in a field selected by the mouse cursor. I don't want any external program.

Example: you have a Sticky Note and you put your cursor in it. Then you press (Ctr + Alt + 1) and "Hello World!" appears.

Upvotes: 0

Views: 1696

Answers (1)

user6017774
user6017774

Reputation:

Set sh = WScript.CreateObject("WScript.Shell")
sh.SendKeys "Hello World!"  
sh.SendKeys "{ENTER}"
WScript.Sleep 100
sh.SendKeys "^p"

Is the best you can do. Above is VBScript.

Upvotes: 1

Related Questions