ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Coding Snacks

IDEA: countdown screensaver manager

(1/1)

openbsd6:
there're a lot of 'countdown\ screensavers out there..but i had this idea, all those countdown screensavers run against a black(or colour-configurable) background..quite boring..how about a screensaver that launches other savers whilst displaying the countdown on top ofn that screensaver..it could be an images slideshow or video or anything screensaver, the countdown screensaver will simply run it and display the countdown ontop of it in a configurable corner of the screen..much better than a blank background..

skrommel:
 :) Here's CountdownSaver to get you started!

Displays a countdown on top of the active screensaver.

Skrommel



--- ---;CountdownSaver.ahk
; Displays a countdown on top of the active screensaver
;Skrommel @ 2008

#NoEnv
#SingleInstance,Force
SetWorkingDir,%A_ScriptDir%
SetWinDelay,0

date=20081224000000  ;YYMMDDHHMMSS
font=Verdena
color=ffffff
size=20
weight=700
x=0
y=0

Gui,-Caption +ToolWindow
Gui,Margin,0,0
Gui,Font,S%size% W%weight% C%color%,%font%
time:=date
EnvSub,time,%A_Now%,Days
FormatTime,formatdate,%date%,dddd dd. MMMM yyyy
Gui,Add,Text,Center Vtext,%time% days left until`n%formatdate%
Gui,Color,123456
Gui,+LastFound
guiid:=WinExist()
WinSet,TransColor,123456 150
SetTimer,CHECKSCREENSAVER,1000
Return


CHECKSCREENSAVER:
  oldactive:=active
  VarSetCapacity(active,4,0)
  DllCall("user32.dll\SystemParametersInfo","uint",0x0072,"uint",0,"uint*",active,"uint",0) ; SPI_GETSCREENSAVERRUNNING = 0x0072 
  If active>0
  {
    time:=date
    EnvSub,time,%A_Now%,Days
    FormatTime,formatdate,%date%,dddd dd. MMMM yyyy
    GuiControl,,text,%time% days left until`n%formatdate%
    Gui,Show,X%x% Y%y% NoActivate
    WinSet,Topmost,,ahk_id %guiid%
  }
  Else
  If oldactive=1
    Gui,Hide
Return

Navigation

[0] Message Index

Go to full version