Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • December 10, 2016, 02:36:21 PM
  • Proudly celebrating 10 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: Display message lower right corner of screen  (Read 3092 times)

deleyd

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 4
    • View Profile
    • Donate to Member
Display message lower right corner of screen
« on: August 13, 2008, 11:03:15 AM »
I need a program to display a message in the lower right corner of the screen, without taking focus away from what the user is doing, and the message disappears after a few seconds.

Any solution is fine. AutoHotKey solution would be fine.

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Donate to Member
Re: Display message lower right corner of screen
« Reply #1 on: August 13, 2008, 12:49:13 PM »
Snarl might meet (and exceed) your needs.

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: Display message lower right corner of screen
« Reply #2 on: August 15, 2008, 05:53:14 PM »
 :) 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%
}
Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
« Last Edit: August 15, 2008, 05:57:30 PM by skrommel »