Circumvent screen lock timeout - script fails

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
aircooled
Posts: 80
Joined: 01 Dec 2018, 08:51

Circumvent screen lock timeout - script fails

02 Feb 2019, 15:13

I have a script that processes a couple of hundreds of records and it works just fine.

The problem is that my organization has imposed a lock on screen lock settings and I can't change it. When the screen locks, my script, that relies on image recognition among other things, fails. Ew.

Actually I VPN to a server where I execute the script. But neither the server or the laptop's organizations allow me to change the settings.

The mouse and the pointer are moving all the time throughout execution so apparently the OS makes a difference between automation mouse movements and manual ones
since as long as I keep working manually the screen doesn't lock.

Can I hear some ideas, thoughts and reflections from you guys, have you confronted (hopefully solved) the same situation/problem. I ain't gonna candy coat it: it is really frustrating .

Maybe I am missing something fundamental but this is really testing my mental sanity ....
digidings
Posts: 24
Joined: 22 Jan 2018, 17:04

Re: Circumvent screen lock timeout - script fails

03 Feb 2019, 06:53

To avoid the screensaver I had a script moving an existing window once per minute by one pixel to the left on even minutes and one pixel to the right on odd minutes.
But for me the following much simpler solution works:

Code: Select all

; some keyboard input every minute.:
SetTimer SimKeyboardInput, 60000
return

SimKeyboardInput:
        Send {ScrollLock}
        Sleep, 100
        Send {ScrollLock}
        return
aircooled
Posts: 80
Joined: 01 Dec 2018, 08:51

Re: Circumvent screen lock timeout - script fails

05 Feb 2019, 04:08

Thanks for this.

Were you executing ahk in the same laptop or were you connected to a server?

I believe your idea will solve my problem since it is the host laptop screen lock timeout that is limiting at the moment.

I wonder if an ahk exe running in a server (opening a browser and performing a flow) can run without everything being visible.
At the moment I execute while looking and keeping the screen without locking.
digidings
Posts: 24
Joined: 22 Jan 2018, 17:04

Re: Circumvent screen lock timeout - script fails

06 Feb 2019, 14:48

I am using this when working via Remote Desktop on an external computer. The script runs on my home PC...
ovidiugabriel
Posts: 9
Joined: 22 Jul 2018, 14:19

Re: Circumvent screen lock timeout - script fails

06 Oct 2023, 03:50

Hello,

I used a very similar similar script (also sending ScrollLock) but it stopped working this week.
Even if I send WindowKey+D for example, it switches to desktop and back but the screen lock still happens.

Are you aware of any change in Windows OS that might cause this?
There is any change in the way IDLE timeout is calculated in windows, compared to how ahk calculates A_TimeIdle ?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Draken, Google [Bot] and 150 guests