Opening an untitled and unsaved NotePad file via shell

Ken Ray kray at
Fri Jul 27 11:23:23 EDT 2007

On Sat, 28 Jul 2007 01:06:27 +1000, Scott Kane wrote:

> ----- Original Message ----- From: "Ken Ray" <kray at>
>> Not that I'm aware of - Notepad can take a command line parameter, 
>> but it is the path to the file it should open. The only other way 
>> you might
>> be able to get data into Notepad is to script it with VBS (if it's 
>> scriptable), but then you have a '.vbs' script that you needed to
>> create to cause this to happen, which is just as bad as having a 
>> temporary file...
> It can't.  However...  If  you can work out a way to do a SendKeys on 
> Rev (or as a plugin) then that probably would work.

Hmm... funny you mention that! I just did a quick web search and ran 
acros a way to use VBS to execute SendKeys:

Basically you do something like this to type "Hello" into Notepad:

   set WshShell = WScript.CreateObject("WScript.Shell")
   WshShell.Run "Notepad"
   WScript.Sleep 500
   WshShell.SendKeys "H"
   WshShell.SendKeys "e"
   WshShell.SendKeys "l"
   WshShell.SendKeys "l"
   WshShell.SendKeys "o"

For more on running VBS scripts in Rev, look at this tip:

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at
Web Site:

More information about the Use-livecode mailing list