WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Sending Keystrokes

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Using SendKey with Variables

Keywords:     sendkey variables

Question:

Can the SendKey Function be used with variables sent from a calling file? If so, how?

Answer:

Yes. If you are *real* careful.
	myvar="Fred and Alice"

	SendKey(myvar)
The problems come in if the calling file has special sendKey characters in it. For example, if it has:
	abc+def
Do you want:

abc+def typed

or

abcDef

typed?

If you want the first case then you must fix the string as follows:

	myvar="abc+def"
	myvar=StrReplace(myvar,"+","{+}")

Article ID:   W13845
Filename:   Using Sendkey with Variables.txt
File Created: 1999:04:15:16:56:46
Last Updated: 1999:04:15:16:56:46