Executing Macro Commands in Remote Desktop

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
winstein
Pro Scripter
Posts: 84
Joined: Mon Nov 26, 2012 3:44 pm

Executing Macro Commands in Remote Desktop

Post by winstein » Tue Jul 25, 2017 8:48 am

Something I have recently found out is, when accessing Remote Desktop (RD), some of the commands are executed on the PC that is used to access the RD, but not within the RD itself. This means that commands like WaitWindowOpen or WaitWindowClosed will not work within the confines of the RD, even though the RD window is maximised. For example, it will not check Notepad in the RD, but outside the RD.

How do I make sure that commands executed from outside the RD can be used within the RD?

Thank you for reading.
PPQ

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Executing Macro Commands in Remote Desktop

Post by Marcus Tettmar » Tue Jul 25, 2017 11:44 am

If you think about how Remote Desktop applications work you'll understand why this is the case.

Remote Desktop apps work like this:

1. They send screen images of the remote system in one direction.
2. They send mouse and key events in the other.

That's it. That's all they do. Therefore the local PC has absolutely no knowledge or concept of windows, window handles, controls, buttons, etc ... there's no link to the underlying technology. After all, you could be connecting to a Linux or Mac desktop from your Windows machine.

Therefore when automating a remote desktop from your PC you will have to rely on simple key/mouse simulation and image recognition. You will NOT be able to use e.g. WaitWindowOpen. A new window in the remote machine is just a bunch of pixels. Nothing more.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Executing Macro Commands in Remote Desktop

Post by JRL » Tue Jul 25, 2017 1:03 pm

The solution is to buy a copy of Macro Scheduler to install on the remote computer or create executables that run on the remote computer.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts