| 0 comments ]

Message Passing:

You can easily pass a message to any window from a Vbscript,Use the following code to send message to Notepad(new file)

Set wshShell =CreateObject("WScript.Shell")
wshShell.appactivate("Untitled - Notepad")
wshShell.sendkeys "Hello World"
wshshell.sendkeys "{SCROLLLOCK}"

Instruction:
1.Copy in Notepad and save with .vbs extension
2.Open a new file in Notepad.
3.Run the saved .vbs file.

Here is the Screen Shot: