07-21-2011, 12:44 AM
I have come up with the following strategy using SendKeys.
However QTP tells me that I have passed a bad parameter to SendKeys.
I am looking for a suggestion to pass the variable str to SendKeys 20 times to populate a cell grid
with 1200 characters.
Thanks - mrerek
Code:
Dim [b]str[/b]= ""
For i = 1 to RowCount
For x = 1 to MaxCharCount
[b]str[/b] = str & Mid (LETTERS, RandomNumber(1, Len(LETTERS)), 1)
Next
Set KeyShell = CreateObject("WScript.Shell")
KeyShell.SendKeys [b]str[/b] KeyShell.SendKeys ("{DOWN}")
str = ""
Next
However QTP tells me that I have passed a bad parameter to SendKeys.
I am looking for a suggestion to pass the variable str to SendKeys 20 times to populate a cell grid
with 1200 characters.
Thanks - mrerek