Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send keys

Status
Not open for further replies.

OmahaNebraska

Programmer
Aug 31, 2004
13
US
How to send Tab key, and F keys (F10, F11)?
Thanks
 
MyString = Session.Screen.GetString(4, 14, 20)

I use the above to get a string, but I got the error
Runtime error (80010105)

Automation Error
The server threw an exception.

What is that error mean? how to fix it? Anyone know?
Thanks,
Pal.
 
Not sure about the error, but the tab and F keys should be Sess0.Screen.SendKeys "<Tab><Pf1><Pf13>"

You should not need to send the TAB key. Use the PutString method to put data straight to a field.

Sess0.Screen.PutString "MyString", X, Y

Then you can use:
Sess0.Screen.SendKeys "<Enter>"

or whatever other action key you need. We use F1 alot for action:
Sess0.Screen.SendKeys "<Pf1>"

As to the error, sometimes the GetString function performs strangely when you get long strings. You are getting a large string, are you just storing it or are you comparing it to something? Just a thought.

calculus
 
Thanks a lot Calculus,
I got it works then. I use the one you sugguest Sess0.Screen.PutString "MyString", X, Y is 100% acurate better than tab key.

For the error. It fix itself. Today, I come in restart my pc and it works...... I have a weird PC.
Have a great weekend!
 
Hello, I need help again.

on the Extra screen. when send the enter key I use:
session.screen.sendkeys("<Enter>") and it works. But when I open a new session the above Enter key doesn't work. The screen look different too.

how many ways to send Enter key?
Thanks,
 
Your still sending the "<Enter>" key, but all that stuff in front of the "Enter" tells Extra which session to send it to.

If you've got more than 1 session open things will get interesting. It is possible to do, but I think it may be a little more than you want to get in to right now.

calculus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top