Skip to content

Scenarios

Steve Williams edited this page May 17, 2024 · 6 revisions

Keep Remote Session Alive Whilst Working From Home

By far the most common use of Move Mouse is to keep remote sessions alive whilst working from home.

Most companies employ strict session idle times that will disconnect you when you're away from your computer, resulting in you having to reconnect all over again.

Move Mouse can assist here by running in the background, and automatically generate user activity when it detects you are away from your computer to keep your remote session alive, then fade into the background on your return.

There are a myriad of ways users can connect remotely when working from home. Commonly this will be a local client (Citrix Receiver, VMware Horizon, AWS WorkSpaces, etc.) to either connect directly to your office computer, or maybe launch applications from a web portal. In this example I am going to use the VMware Horizon Client that is allowing me to connect to a virtual desktop (VDI) in my workplace, although you may need to customise some steps to suit your own scenario.

  1. In the Settings window, add an Activate Application Action to bring your remote client into the foreground.
  1. You can either opt to use Process or Window Mode. I would suggest Process as window titles can change and cause the Action to fail.
  2. Select the Name of your remote client from the list. Use the Test button to validate it's working.
  1. Add a Position Mouse Cursor Action. This will ensure the mouse pointer is moved to a safe location in the remote session before we send a click (I normally hover it over the Start Button in the remote session). Use the Track feature to automatically calculate the correct Position. Use the Test button to validate it's working.
  1. Add a Click Mouse Button Action to send a mouse click into your remote session. This generally works better than a Move Mouse Cursor Action which can sometimes not be detected in the remote session.
  1. Click the Behaviour tab and configure as shown. This will instruct Move Mouse to randomly perform your Actions every 30 - 60 seconds, automatically pause when user activity is detected (you are using your computer), and automatically resume when you are away from your computer for more than three minutes.
  1. Click the Appearance tab and configure as shown. This will configure Move Mouse to show itself when in operation, but automatically minimise when it is paused.

Allow Move Mouse Only During Working Hours

If you would like to leave Move Mouse running the whole time, but you only want it to be active during your working hours, you can achieve this using Blackouts.

I am going to use a typical Monday - Friday 8:00 am - 6:00 pm working week as an example, but you should be able to customise this to suit whatever your working hours are using one or more Blackout windows. In this example I will also assume Move Mouse should not be active over the weekend.

  1. Add a Blackout window that starts at the end of your working day (6:00 pm), and will carry through the night until your next working (14 hours). This window should be active every day.
  2. Add a second Blackout window that will be active only on Saturday and Sunday to essentially fill the gaps from the first Blackout window (8:00 am for 10 hours).

Here is how your two Blackout windows combine to only allow Move Mouse to be active during your working hours.

Reactivate Previous Active Window On Pause/Stop

In response to this Feature Request, here is how you can configure Move Mouse to automatically reactivate the last active window when it pauses/stops.

  1. Download the Capture Active Window.ps1, which will detect the active windows and save it's PID to a text file.
  2. Add a new PowerShell Script Start Action and configure it as below using the path you downloaded Capture Active Window.ps1 to. This Action should be at the very top of your list.
  1. Now specify whichever Actions you want Move Mouse to perform at each Interval to keep your session alive.
  2. Download the Activate Window.ps1, which will read the previously captured PID from the text file, and attempt to reactivate the window.
  3. Add a new PowerShell Script Stop Action and configure it as below using the path you downloaded Activate Window.ps1 to. This Action should be at the very bottom of your list.
  1. In the Behaviour section, configure Move Mouse to automatically pause and resume when user activity is detected.
  1. In the Appearance section, ensure Move Mouse is not configured to become the topmost application when it's active, otherwise the active window you will be capturing will be Move Mouse itself.