0

This is my ahk script, having it running on my host computer:

pinput(str){
  sendinput %str%{Enter}
}

After logging into an RDP session via Citrix Workstation when I activate that script with a hotkey, its first character gets converted to lowercase.

Making it typed multiple times in a notepad it seems to alternate or is just randomly getting lowercased. When using in an input window that appears again and again without the expected string it can type every time just with lowercase which is wrong.

How could I go about to solve this issue? I should not put binaries/install anything to that remote machine...

Maybe create a loop and verify that sendinput is infact with initial uppercase? Or that is always the case and this is just a citrix bug as it seems from this issue: https://discussions.citrix.com/topic/417269-copy-and-paste-issue-on-citrix-workspace/

obeliksz
  • 468
  • 9
  • 24

2 Answers2

0

I don't have access to Citrix Workstation to test it but i would try to use ahk built-in: StringUpper with parameter T as described here: https://www.autohotkey.com/docs/v1/lib/StringLower.htm If you only care about first char, then will ensure at least that first character is capitalized.

pinput(str){

   ; make sure first char will be capitalized
   StringUpper, out, str, T

  ; uncomment if we want entire string to be lower or upper case
  ; StringLower, out, str
  ; StringUpper, out, str
  sendinput %out%{Enter}
}

for example,

pinput("MyString")

output will be

Mystring
lww
  • 624
  • 1
  • 7
  • 14
0

Citrix-Rdp could always turn the initial uppercase letter into lowercase, so the solution is not to use the Citrix-Rdp clipboard where this could be an issue.

I solved this by using a vbs script put on my remote desktop to put a string to my clipboard, this way it is always at hand, could be configured with a hotkey and is without using any additional binaries.

obeliksz
  • 468
  • 9
  • 24