Try
HourglassQuotes!
It displays a quote when the PC is busy, either from a file or from
www.quotableonline.com.
Place the quotes in a text file and edit the files= and timer= lines.
To keep the quote from dissapearing, just click inside the window. It dissappears when it loses focus.
Skrommel
;HourglassQuotes.ahk
; Displays a quote when the PC is busy
;Skrommel @ 2009
delay=9 ;seconds to show the quote
file= ;file with quotes. if empty, retrieve quote from internet
internet=http://www.quotableonline.com/index.php ;url to page with random quote
html1:="<div class=leftnavText><blockquote id=blockquote > " ;text to look for before the quote
html2:="</blockquote>" ;text to look for after the quote
filter:=" " ;string to remove from the quote
#NoEnv
#SingleInstance,Force
applicationname=HourglassQuotes
IniRead,counter,%applicationname%.ini,Settings,counter
If (counter="Error" Or counter<1 Or counter>999999)
counter=1
If file=
Gosub,DOWNLOAD
Else
Gosub,READ
Loop
{
Sleep,1000
;Stolen from Sean at http://www.autohotkey.com/forum/topic32959.html
VarSetCapacity(ci,20,0),NumPut(20,ci)
DllCall("GetCursorInfo","Uint",&ci)
hCursor:=NumGet(ci,8)
If showing<>1
If hCursor In 65575,65557 ;65575=appstarting 65557=wait
{
Gui,Destroy
Gui,+ToolWindow +AlwaysOntop
Gui,Color,FFFFFF
Gui,Add,Text,w200,%quote%
Gui,Show,x0 y0 NoActivate,%applicationname%
Gui,+LastFound
guiid:=WinExist()
SetTimer,QUOTEOFF,% delay*-1000
showing=1
If file=
Gosub,DOWNLOAD
Else
Gosub,READ
If quote=
Continue
}
}
ExitApp
READ:
FileReadLine,quote,%file%,%counter%
If ErrorLevel=1
{
counter=1
FileReadLine,quote,%file%,%counter%
}
Else
counter+=1
IniWrite,%counter%,%applicationname%.ini,Settings,counter
Return
DOWNLOAD:
UrlDownloadToFile,% internet,quote.htm
FileRead,quote,quote.htm
StringGetPos,pos,quote,% html1
StringTrimLeft,quote,quote,% pos+StrLen(html1)
StringGetPos,pos,quote,% html2
StringLeft,quote,quote,% pos
StringReplace,quote,quote,% filter,,All
Return
QUOTEOFF:
active:=WinExist("A")
If (active=guiid)
{
SetTimer,QUOTEOFF,-1000
Return
}
showing=0
Gui,Destroy
Return