Sign in to follow this  
Followers 0
dufran3

Screen Timeout Counter-Measure?

13 posts in this topic

I'm trying to figure out how to write a script, that will look for user input...in some form...if none occurs after 10 consecutive minutes, then the script will send some sort of input that will reset the screen lock in windows, then wait again. I have no idea where to start with this. Any ideas?

Share this post


Link to post
Share on other sites



You could look for mouse movement with MouseGetPos() and look every second if the position is different. But I ever heard of a DllCall() function so Windows does everything for you. I really don't know again what it was.. I usually don't use the DllCall() function.


PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.

Share this post


Link to post
Share on other sites

If you just send some input regardless of whether there is user input, would that have the desired affect?

I done it once just moving the mouse a pixel and back every few minutes, to save laptop dimming screen when watching a film on it.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

dufran3,

_Timer_GetIdleTime will tell you how long the user has been idle - then just move the mouse a bit as JohnOne suggested. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

This is what I have so far, not sure how to move the mouse 1 pixel though....

#include <Timers.au3>
;Screen Timeout Countermeasure

While 1
    If @error = -1 Then ExitLoop
        $timer = _Timer_GetIdleTime()
    If $timer >900,000 Then
        MsgBox(0,'','Moving the Mouse')
        MouseMove(+1,0)
    EndIf
Wend

Share this post


Link to post
Share on other sites

dufran3,

Perhaps MouseGetPos and MouseMove might help here? :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

It always has to be you making me look dumb...lol.. :)

this?

#include <Timers.au3>
;Screen Timeout Countermeasure

While 1
    If @error = -1 Then ExitLoop
        $timer = _Timer_GetIdleTime()
    If $timer >900,000 Then
        MsgBox(0,'','Moving the Mouse')
        $MoPosition = MouseGetPos()
        $xPos = $MoPosition[0]
        $yPos = $MoPosition[1]
        MouseMove($xPos +1,$yPos +1)
    EndIf
Wend
Edited by dufran3

Share this post


Link to post
Share on other sites

dufran3,

It always has to be you making me look dumb

Certainly not my intention - only trying to help without giving the entire answer. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

lol, yeh I realize, thanks for all the help!

Share this post


Link to post
Share on other sites

dufran3,

My pleasure! :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Probably best to move the mouse back to where you found it after moving +1, so it dosent end up somewhere it cannot move anymore.

hmmm...noted, I will look into doing that

Share this post


Link to post
Share on other sites

And you need some delay...

EndIf
    Sleep(60000)
Wend

Richard.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0