Sign in to follow this  
Followers 0
buzz44

WMP Visualisation ScreenSaver !

5 posts in this topic

#1 ·  Posted (edited)

All the screen savers I have suck! but i really like the visualisations in Window Media Player 10. So I thought to myself, "AHA!".

If your mouse is inactive for 10 minutes it will open up windows media player, put it to full size, and play a blank 10 second file.

Before using this as a screensaver be sure that your screensaver is set to "none", and that you have "repeat" ticked in WMP so it plays over and over again.

Thanks to CyberSlug for helping me with the Run() Function

The blank .wav file is included below, keep it in the same directory and the script.

#NoTrayIcon

$NWMP = 1
$Time = 1

$Exe = RegRead("HKEY_USERS\.DEFAULT\Software\Microsoft\Keyboard\Native Media Players\WMP", "ExePath")

While 1
   If Not ProcessExists("wmplayer.exe") Then
      $MousePos_1 = MouseGetPos()
      Sleep(5)
      $MousePos_2 = MouseGetPos()
      If $MousePos_2[0] = $MousePos_1[0] Or $MousePos_2[1] = $MousePos_1[1] Then
         $NWMP = 1
         If $Time = 1 Then
            $Begin = TimerInit()
            $Time = 0
         EndIf
         While 1
            $Dif = TimerDiff($Begin)
            If $NWMP = 1 Then
               If $Dif > 600000 Then
                  Run($Exe & ' "' & @ScriptDir & '\test.wav"', "", @SW_SHOW)
                  WinWaitActive("Windows Media Player")
                  Sleep(2000)
                  Send("!{ENTER}")
                  ExitLoop
               EndIf
               _WMP()
            EndIf
            If $NWMP = 0 Then
               ExitLoop
            EndIf
         WEnd
      Else
         $Time = 1
      EndIf
   Else
      _NWMP()
   EndIf
WEnd

Func _WMP()
   $MousePos_3 = MouseGetPos()
   Sleep(5)
   $MousePos_4 = MouseGetPos()
   If $MousePos_4[0] <> $MousePos_3[0] Or $MousePos_4[1] <> $MousePos_3[1] Then
      $NWMP = 0
   EndIf
EndFunc

Func _NWMP()
   $MousePos_3 = MouseGetPos()
   Sleep(5)
   $MousePos_4 = MouseGetPos()
   If $MousePos_4[0] <> $MousePos_3[0] Or $MousePos_4[1] <> $MousePos_3[1] Then
      ProcessClose("wmplayer.exe")
      $NWMP = 1
      $Begin = TimerInit()
   EndIf
EndFunc

Edit: HMMMMMMMMMMM, Sry about the other posts, I have no idea why they are there lol, If a Mod would like to delete them, please do.

Edit2: Removed attached file... It was taking up too much room lol.

Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites



Blank file at 218 kb!?

Change the file compression to something better, OGG or something can get a 1 second blank file down to like 1kb, probably :)


"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites

For people who like music on hold, or while they're sleeping, there is a command line option for playlists.

/Playlist PlaylistName

Now make it yell "WAKE THE F*** UP!" at a specified time. :)


601DisengageEnd Program

Share this post


Link to post
Share on other sites

Please correct me if I'm wrong, but couldn't you just create an EXE that runs WMP with the /playlist option or something, rename it to .SCR, put it in the Windows folder and tell Windows to use it as the screensaver? Let Windows handle the idle part of the equation.


My UDFs: ExitCodes

Share this post


Link to post
Share on other sites

I think you may want to change this line;

If $MousePos_2[0] = $MousePos_1[0] Or $MousePos_2[1] = $MousePos_1[1] Then

TO

If $MousePos_2[0] = $MousePos_1[0] AND $MousePos_2[1] = $MousePos_1[1] Then

Just a thought but in theory the mouse could be moved and be on 1 of the same axis's, however unlikely, it still could happen. =)

Later; Lew

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