"Harish_Sasikumar" <harishsasikumar@newsgroup> wrote in message
On Oct 27, 4:31 pm, "Paul Randall" <paulr...@newsgroup> wrote:
> "Harish_Sasikumar" <harishsasiku...@newsgroup> wrote in message
> > I am required to use keystrokes for the purpose of Test automation
> > Set oShell = CreateObject("WScript.Shell")
> > Please correct me on what should be used for (CTRL + *)?
> > Would the following workout?
> > oShell.SendKeys("^*") or oShell.SendKeys("^(*)") ?
> Have you tried looking for information in the scripting help file,
> Try this link (its all one line), but substitute the path to your help
> If you don't have the help file on your system, download it through the
> downloads link at msdn.microsoft.com; note that you may have to right
> on the downloaded help file and choose 'unblock' before it works right.
> -Paul Randall
Yes, i did go through msdn but it never specifically gave an example
to send the Ctrl and asterisk combination
if u have noted, asterisk is placed on the upper part,below it is
8.For which the sendkey method doesnt take asterisk.I did try "^8", it
But i am not sure if its the correct approach.
In the scripting help file's index tab, type in the word processid, and hit
The page should have a VBScript that uses the sendkeys method to run
calculator and do control-C to copy the calculator's result to the
clipboard, and then uses sendkeys to do control-V to paste the clpboard
contents into Notepad. The example demonstrates that for most shifted
characters (such as ~ ; asterisk works the same way), you can type the
shifted character into the string to be sent. You might want to set up a
script to type all the unshifted and shifted characters to Notepad just to
understand how it works.
Note too that if some window pops up while your script is running, that
window will become the active window, an it will get those keystrokes.
Sendkeys is not a reliable way to interact with a window unless you have a
way to prevent other windows from being activated.
Let us know if you need further help.