Or try
Info!
It displays a user defined messagebox with text and an image, and it fades in and out.
Skrommel
;Info.ahk
; Display a user defined messagebox
;Skrommel @ 2008
#SingleInstance,Ignore
#NoTrayIcon
applicationname=Info
IfNotExist,%applicationname%.ini
FileAppend,
(
`;%applicationname%.ini
`;[Settings]
`;title=Info
`;image=%A_WinDir%\Bubbles.jpg
`;imagewidth=64 ;>0
`;text=Info by www.1HourSoftware.com
`;textwidth=100 ;>0
`;position=BR ;TL TR BL BR C
`;transparency=200 ;0-255
`;showtime=5 ;>0
`;fadeintime=1 ;>0
`;fadeouttime=2 ;>0
`;permanent=0 ;0 1
`;sound=%A_WinDir%\Media\ding.wav
[Settings]
title=Info
image=%A_WinDir%\Bubbles.jpg
imagewidth=64
text=Info by www.1HourSoftware.com
textwidth=100
position=BR
transparency=200
showtime=5
fadeintime=1
fadeouttime=2
permanent=0
sound=%A_WinDir%\Media\ding.wav
)
,%applicationname%.ini
IniRead,image,%applicationname%.ini,Settings,image
IniRead,imagewidth,%applicationname%.ini,Settings,imagewidth
IniRead,text,%applicationname%.ini,Settings,text
IniRead,textwidth,%applicationname%.ini,Settings,textwidth
IniRead,position,%applicationname%.ini,Settings,position
IniRead,transparency,%applicationname%.ini,Settings,transparency
IniRead,showtime,%applicationname%.ini,Settings,showtime
IniRead,fadeintime,%applicationname%.ini,Settings,fadeintime
IniRead,fadeouttime,%applicationname%.ini,Settings,fadeouttime
IniRead,permanent,%applicationname%.ini,Settings,permanent
IniRead,sound,%applicationname%.ini,Settings,sound
SysGet,monitorcount,MonitorCount
right=0
bottom=0
Loop,%monitorcount%
{
SysGet,monitor,Monitor,%A_Index%
If monitorRight>%right%
right:=monitorRight
If monitorBottom>%bottom%
bottom:=monitorBottom
}
Gui,Add,Picture,W%imagewidth% H-1 Vvimage,%image%
Gui,Add,Text,W%textwidth% Vvtext,%text%
Gui,Show,NoActivate X%right%,%title%
GuiControlGet,image,Pos,vimage
GuiControlGet,text,Pos,vtext
Gui,Destroy
Gui,+LastFound +ToolWindow +AlwaysOnTop
Gui,Add,Picture,% "XM YM+" MAX(imageH,textH)/2-imageH/2 " W" imageW " H-1",%image%
Gui,Add,Text,% "X+10 YM+" MAX(imageH,textH)/2-textH/2 " W" textW,%text%
Gui,Show,NoActivate X%right%,%title%
guiid:=WinExist()
WinGetPos,guix,guiy,guiwidth,guiheight,ahk_id %guiid%
SysGet,workarea,MonitorWorkArea
If position=TL
{
x:=workareaLeft
y:=workareaTop
}
If position=TR
{
x:=workareaRight-guiwidth
y:=workareaTop
}
If position=BL
{
x:=workareaLeft
y:=workareaBottom-guiheight
}
If position=BR
{
x:=workareaRight-guiwidth
y:=workareaBottom-guiheight
}
If position=C
{
x:=workareaLeft+(workareaRight-MonitorLeft)/2-guiwidth/2
y:=workareaTop+(workareaBottom-workareaTop)/2-guiheight/2
}
If fadeintime>0
{
WinSet,Transparent,0,ahk_id %guiid%
WinMove,ahk_id %guiid%,,%x%,%y%
now:=A_TickCount
Sleep,10
WinSet,Transparent,1,ahk_id %guiid%
now:=A_TickCount-now
steps:=fadeintime*1000/now
increase:=
Loop,% steps
{
Sleep,10
WinSet,Transparent,% transparency/steps*A_Index,ahk_id %guiid%
}
}
Else
WinMove,ahk_id %guiid%,,%x%,%y%
SoundPlay,%A_WinDir%\Media\ding.wav
Sleep,% showtime*1000
If permanent=1
Return
If fadeouttime>0
{
WinMove,ahk_id %guiid%,,%x%,%y%
now:=A_TickCount
Sleep,10
WinSet,Transparent,%transparency%,ahk_id %guiid%
now:=A_TickCount-now
steps:=fadeouttime*1000/now
increase:=
Loop,% steps
{
Sleep,10
WinSet,Transparent,% transparency-transparency/steps*A_Index,ahk_id %guiid%
}
}
GuiClose:
ExitApp
Return
MAX(a,b)
{
If a>%b%
Return %a%
Return %b%
}