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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sendkeys and Citrix

Status
Not open for further replies.

Geates

Programmer
Aug 25, 2009
1,566
US
I'm trying to automate a process through a Citrix connection. The .AppActivate works fine and the .sendkeys works with letters, numbers, and symbols, but not control keystrokes like enter or tab ({ENTER}, {TAB}). It could be as simple as "Citrix doesn't observe control keystrokes issued by objShell," but am hoping this is not the case.

Does anyone have input?

Code:
set objShell = CreateObject("Wscript.shell")
objShell.AppActivate ("Ancillary Modifier Conversation")
objShell.sendKeys "a" 'works
objShell.sendKeys "{TAB}" 'does not works
objShell.sendKeys "7" 'works
objShell.sendKeys "{ENTER}" 'does not works
objShell.sendKeys "!" 'works

-Geates

 
No, '~' didn't work. It didn't even show up as a character. I wonder what else doesn't show up?
I sent the app a string of numbers and symbols.

I sent [tt]`~1!2@3#4$5%6^7&8*9(0)-_=+[{]};:,<.>/?'[/tt]
Which printed [tt]`1!2@3#4$5&8*90-_={];:,<.>/?'[/tt]
Characters [tt]~%6^7()+[}[/tt] did not show. "%", "^", and "+", along with their subsequent char, makes sense because they are control characters

This particular Citrix connection seems to only accept chars 32 to 126 (except chars the control chars). Upon a closer look, you may wonder why "{" showed up but "}" did not. Well, "{" did not show up but "+[" (which equals "{") did. Just as "^" didn't show up but "+6" did. This suggests that there may be away to send control chars. However, as one would expect, they come across as characters (ie "+[tab+]" didn't work. It came across as the literal "{tab}") I also tried sending the ascii code value (chr(9) and chr(123) & "tab" & chr(125)) but they seem to be interpreted as invalid characters. :(

Oh well, I guess I'll have to do it manually. Time to block out my calendar for a month!

-Geates


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top