Jump to content

How to use Windows 8 start screen as screen saver


Recommended Posts

It seems a waste to me that Windows 8 has all these fancy new self-updating live tiles on its start screen, but nobody gets to see them unless they specifically request to by pressing the Windows key or clicking in the corner of the screen.  In my mind, this sort of summary status info would be most effective as a screen saver - something that takes over the screen when the computer has nothing better to do, and moves out of the way when a more important task comes along.  So, I set out to make it happen, but right away I hit a snag.  Here's my first try at coding this, based mostly on the script examples given with AutoIt:

#include <SendMessage.au3>

Example()

Func Example()
    Local Const $WM_SYSCOMMAND = 0x0112
    Local Const $SC_TASKLIST = 0xF130
    Opt("WinTitleMatchMode", 4)
    Local $hwnd = WinGetHandle('classname=Progman')
    _SendMessage($hwnd, $WM_SYSCOMMAND, $SC_TASKLIST, 0)
EndFunc   ;==>Example

When I compile this to an .exe and run it, it does exactly what I expect, but when I rename it to .scr and let the OS invoke it that way, it only causes a momentary glitch in the screen image.  Apparently, SendMessage must be one of the things that causes the OS to terminate any screen saver program that's running.  I've looked on the Internet for a generalized list of things that one needs to avoid doing in the context of a screen saver, or ways to work around those limitations, but haven't found anything useful.  I knew that I had to avoid any method of invoking the start screen that involved "faking" keystrokes, but I still haven't found a way to make it work.  Can anyone here help?
 

Link to comment
Share on other sites

You're realize you effectively have null as your window handle?

Apparently, that's a bad thing, but:

1) I copied those commands verbatim from the example script, and never gave a thought (until now) to what they meant;

2) Despite this error, the script actually succeeds in doing what I want it to do, as long as I don't invoke it in the context of a screen saver, so it's unlikely that this error is what's causing it to fail.

I'll review the help files to try and figure out what I actually should be doing here (unless you'd like to supply some example code that's better than that which is distributed as part of the AutoIt installer :) ), but I don't think it's going to get me any closer to fixing the script.

Link to comment
Share on other sites

Okay, here's the revised script...

#include <SendMessage.au3>

Example()

Func Example()
    Local Const $WM_SYSCOMMAND = 0x0112
    Local Const $SC_TASKLIST = 0xF130
    ;Opt("WinTitleMatchMode", 4) ;setting 4 is deprecated
    Local $hwnd = WinGetHandle('[Class:Progman]')
    _SendMessage($hwnd, $WM_SYSCOMMAND, $SC_TASKLIST, 0)
EndFunc   ;==>Example

...but it still fails in exactly the same way.

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...