topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 12:51 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: countdown screensaver manager  (Read 6751 times)

openbsd6

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
IDEA: countdown screensaver manager
« on: May 07, 2008, 10:43 AM »
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

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: countdown screensaver manager
« Reply #1 on: June 14, 2008, 05:47 PM »
 :) 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