Jump to content

Keep screensaver active (Block Input)


Recommended Posts

Hello all,

Need a few suggestions please.

Currently I have my screensavers come on after 10 minutes, no password or anything, they just go off as soon as there is any input to the keyboard or mouse. What I need to do is keep the screensaver on for a few hours without anyone being able to disrupt them. The workstations will not be logged in, just sitting at the logon screen.

Intially I had thought of just sending out a small 2 line script

#notrayicon
blockinput(1)

I think the problem with this not working is that because no-one is logged in to the workstations the script will not block the input. I'm hoping that someone can come up with a solution as it would be perfect for the machines to be locked until I remotely restart them.

thanks.

Link to comment
Share on other sites

If you want it locked, just lock it before you go. Then only you or an administrator can unlock it.

Hi,

I should have explained myself a bit better.

It isn't just one workstation that I need this to for, it is 400.

We are having an open day(where visitors walk about). I have created a screensaver, which is basically a presentation, and I want it to be on all of the screens for people to read as they are walking about. The problem is that if anyone does anything to the keyboard or mouse then I am going to have a logon screen sitting there for 5 minutes until the screensaver kicks in again. Unplugging them isn't an option, the network is split over 4 sites.

This happens once a year and every time I leave it to the last minute before trying to work out a soultion, just thought that I could actually have it all working in advance.

Thanks for replying

Link to comment
Share on other sites

Sorry for replying to my own post but I think I might be fighting a losing battle trying to disable the keyboard and mouse at the logon screen so I have gone for the next best solution.

while 1

if ProcessExists("screensaver.scr") Then
    sleep(300)

Else

ShellExecute(RegRead("HKEY_USERS\.DEFAULT\Control Panel\Desktop","SCRNSAVE.EXE"))

EndIf

WEnd

I will just have this script reload the screensaver if someone causes it to close. The question I now have is about the sleep time in the loop, ideally I would like it to be as small as possible but I don't want the script sucking the life out of the machine and causing the screensaver to run slow.

I am going to try and test this on as many different spec machines as I can( I have 4 hours until the machines need shutdown) but I was wondering if anyone could share their experiences with a loop running constantly like this over 4 hours. Or am I being paranoid?

Link to comment
Share on other sites

Keep in mind that AutoIt scripts can't run while the workstation is locked or logged off.

You'd be better off rewriting the screen saver to not exit on input events. Or you could even write a wrapper that draws the screen saver in itself and use that as a screen saver if you don't have access to the original code. I could write a wrapper if you needed it.

Link to comment
Share on other sites

Keep in mind that AutoIt scripts can't run while the workstation is locked or logged off.

You'd be better off rewriting the screen saver to not exit on input events. Or you could even write a wrapper that draws the screen saver in itself and use that as a screen saver if you don't have access to the original code. I could write a wrapper if you needed it.

Thanks for the reply.

I have just realised that it won't work if someone isn't logged in.

I created the screensaver using axialis screensaver producer pro but unfortunately this software will only allow me to prevent a flash screensaver from exiting, the screensaver I produced is basically a slide show and there are no advanced options I can apply to this.

I suppose another option would be to change the wait time of the screensaver but I think the smallest this can be is 1 minute, which is still quite a long time.

Am I right in thinking that the wrapper has to be an exe? Unfortunately I need to keep the screensaver as an scr, the reason for this is that I am just remotely overwriting our normal screensaver for the weekend with different version, then I will be changing it back. It would be far too much work to do it any other way.

thanks again

Link to comment
Share on other sites

Scr files are exe files with a different extension so Windows can separate them. Screen savers are pretty easy to write. The wrapper wouldn't even need any real code.

would you mind explaining what is needed with the wrapper, will it be written using autoit?

I have never done this before.

Link to comment
Share on other sites

Screen savers just need to take a couple command lines. They create a full screen window and close on keyboard/mouse input.

The command lines are

ScreenSaver.scr           - Show the Settings dialog box.
ScreenSaver.scr /c        - Show the Settings dialog box, modal to the foreground window.
ScreenSaver.scr /p <HWND> - Preview Screen Saver as child of window <HWND>.
ScreenSaver.scr /s        - Run the Screen Saver.

All you would do is just read the command line for /s. If you get it, make a window with no border and have it take up the full screen. Then just run the other screen saver with the /p command line and give it the handle to your window in decimal.

To keep your screen saver active, just don't close your window. :D

Edited by Richard Robertson
Link to comment
Share on other sites

Screen savers just need to take a couple command lines. They create a full screen window and close on keyboard/mouse input.

The command lines are

ScreenSaver.scr           - Show the Settings dialog box.
ScreenSaver.scr /c        - Show the Settings dialog box, modal to the foreground window.
ScreenSaver.scr /p <HWND> - Preview Screen Saver as child of window <HWND>.
ScreenSaver.scr /s        - Run the Screen Saver.

All you would do is just read the command line for /s. If you get it, make a window with no border and have it take up the full screen. Then just run the other screen saver with the /p command line and give it the handle to your window in decimal.

To keep your screen saver active, just don't close your window. :D

Sorry for not getting back sooner.

What I ended up doing was just change the screen saver time to 60 secs, I just have to hope that not very many people feel the need to bang on keyboards.

I am still interested in this wrapper business though. Would I not suffer the same problem with a wrapper though, a user would have to be logged in before this solution would work, I wouldn't be able to use it at the logon screen would I?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...