1

So I just started being able to use Citrix Receiver which I think connects to a virtual desktop where Microsoft office 2016 is a desktop application. This virtual desktop I believe is always running. I have some excel macros that I would like to trigger from windows task scheduler on the virtual desktop.

I have created macros that do not use sendkeys that I have tested and work successfully on the virtual desktop whether I'm actively connected to it or if I'm not connected at all to the virtual desktop.

I have also created some macros that use sendkeys in the virtual desktop. When I am actively connected to the Citrix receiver virtual desktop, then my macros with sendkeys work perfectly fine. It is only when I use task scheduler to trigger the macro with sendkeys to run at a time when I am not actively connected to the virtual desktop that the sendkeys do not seem to work.

I do not really understand why this happens? From doing some web searching, it seems that people often run into issues using sendkeys with Citrix receiver. However, I have no problem using sendkeys when I'm actively connected. It's only an issue with sendkeys when I'm not actively connected. Does sendkeys somehow interact and use the active machine that I'm on or something in order to register the sendkeys on the virtual desktop?

Thanks for the help and let me know if what I explained does not make sense.

Community
  • 1
  • 1
Nobodyukno
  • 21
  • 7
  • check here https://stackoverflow.com/questions/5028872/sendkeys-alternative-that-works-on-citrix#5028898 ............ btw. citrix receiver connects to a virtual machine. i think that it is based on Xen. – jsotola Aug 19 '17 at 05:20
  • Your macros work ok on a local desktop, after a "Windows+L" action? – manuell Sep 20 '17 at 13:56
  • @manuell The macros on the virtual machine run using SendKeys when I am active on the connection. If I disconnect from the virtual machine and trigger a macro from the task scheduler, then the macro fails at the SendKeys portion of the code. – Nobodyukno Sep 22 '17 at 17:18
  • That's why I was asking about testing your macro on your local Desktop, no Citrix, when your session is "locked". I suspect your question has nothing to do with Citrix, and all to do with "no active session". – manuell Sep 23 '17 at 12:41
  • @manuell Ahh didn't realize you meant testing when the session was locked. But you are right, it does not work on my desktop when my computer is locked. So SendKeys needs an active session to execute? Is there anyway around this? – Nobodyukno Oct 04 '17 at 22:09
  • If you find one, let me know! – manuell Oct 05 '17 at 08:12

0 Answers0