AHK on Windows Server 2022 VPS

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
edpenguin
Posts: 2
Joined: 08 Dec 2022, 10:53

AHK on Windows Server 2022 VPS

Post by edpenguin » 08 Dec 2022, 11:09

I used to have access to a VPS running Windows 10. The AHK scripts I put together for that VPS worked fine both when I was logged in or not logged in to the VPS via remote desktop.

I have had to move hosts and now run windows server 2022. I login to the machine using Windows Remote Desktop Connection. On this new VPS, if I am logged in via RDC, the scripts, which are on a schedule, work fine. But if I am not logged in they stop after the first line which is in all cases the loading of a web page. Example:

Code: Select all

Run, https://streamyard.com/v9q3hpx4bh
Sleep, 15000
WinWait, StreamYard - Brave, 
IfWinNotActive, StreamYard - Brave, , WinActivate, StreamYard - Brave, 
WinWaitActive, StreamYard - Brave, 
MouseClick, left,  976,  744
Sleep, 5000
The web page loads but the next action (MouseClick, left, 976, 744) is not executed. Nearly all the scripts I have start with loading a specific web page and this works ... but mouse clicks do not.

The scripts are saved as .ahk files.

Any pointers much appreciated.

Ed

edpenguin
Posts: 2
Joined: 08 Dec 2022, 10:53

Re: AHK on Windows Server 2022 VPS

Post by edpenguin » 02 Jan 2023, 07:06

Just bumping this. Any suggestions as to why mouse clicks are not being executed ?

User avatar
mikeyww
Posts: 26871
Joined: 09 Sep 2014, 18:38

Re: AHK on Windows Server 2022 VPS

Post by mikeyww » 02 Jan 2023, 07:32

Yes. The WinWait is waiting for your window. You can add a timeout, to understand whether the command fails. You can then explore why the window is not being found.

Post Reply

Return to “Ask for Help (v1)”