Use WSH to send key strokes to an app?
> Why does %~ stand for <alt>-enter?
Some convention is needed to represent keyboard keys that have no textual
You may have deduced that I hit the enter key a couple of times there; could
you tell how many times I hit the <ALT> key?
than "%"). Why they picked %~ instead of something else is beyond me. Why is
it that most of the world chose to drive on the right side of the road? In
some cases following the convention seems more important than understanding
how it was developed.
Short answer: because it does.
> Did I miss the documentation as to what
> each key is represented by?
Apparently you did, as it is there (assuming you have the most recent docs).
> Eli Allen
> > You need to use then AppActivate and SendKeys methods of WScript.Shell
> > object. The text you use with AppActivate must be unique and appears in
> > title bar of the running application for . If you plan to send multiple
> > keystrokes to the application. Break them in to individual functions
> > <Alt-F> Open the File Menu
> > P Select Print/open print dialog box
> > <Enter> Start printing/close print dialog box
> > Send each group of keystrokes with its own AppActivate and SendKeys
> > Then by trail-and-error determine the correct amout of of delay time
> > between each of these pairs.
> > For sending only an <Alt-Enter>, use the following.
> > Set oWS = WScript.CreateObject("WScript.Shell")
> > oWS.AppActivate "MyApplication"
> > oWS.SendKeys "%~"
> > WScript.Sleep (100)