AutoHotkey Community

It is currently May 25th, 2012, 3:49 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Toaster Popups
PostPosted: September 14th, 2007, 1:33 am 
Offline

Joined: November 10th, 2005, 11:26 pm
Posts: 169
Location: Texas
I would like to see a feature for Toaster Popups like the ones used in MS Messenger 8 and NOD32 AV. The NOD32 one's would be especially be nice because they're not static like a TRAYTIP and you can put a progress bar inside of them too.

I'm sure I can achieve this effect with GUI and GUICONTROL, but think it would be so much easier if there was a command like TRAYTIP. You can call it TOASTER or TRAYPOPUP


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 14th, 2007, 1:56 am 
Offline

Joined: May 17th, 2007, 9:06 pm
Posts: 421
Location: England
Quite a few windows programs use this:
Windows Live Messenger
Windows Live Mail
Windows Media Player
eBay Alerts
Just to name a few that popup from time to time on my system

This leads me to think that there might be something that can be done with DllCall to achieve this
Not sure, but might be worth having a look at


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 14th, 2007, 3:55 am 
Offline

Joined: July 21st, 2006, 6:13 am
Posts: 558
Something like this maybe...

Code:
#SingleInstance Force
#Persistent
#NoEnv
SetBatchLines, -1
SysGet, MonitorWorkArea, MonitorWorkArea
MonitorWorkAreaBottom -= 65
MonitorWorkAreaRight -= 307
Gui, +ToolWindow +LastFound +AlwaysOnTop
Gui, Color, Silver
Gui, Font, s14 cRed
Gui, Add, Text, , This is a Toaster PopUp window!
Gui, Show, w300 h40 x%MonitorWorkAreaRight% y%MonitorWorkAreaBottom%, Toaster PopUp
Sleep, 3000
Trans_Num = 255
Loop, 255
   {
      WinSet, TransParent, %Trans_Num%, Toaster PopUp
      Sleep, 20
      Trans_Num--
   }
Gui, Destroy
ExitApp

_________________

HTH...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 14th, 2007, 11:09 am 
Offline

Joined: February 5th, 2007, 12:19 pm
Posts: 192
Location: Osnabrück, Germany
Try also InfoboxZ from IsNull. Very nice!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 17th, 2007, 5:25 pm 
Offline

Joined: April 17th, 2007, 1:37 pm
Posts: 761
Location: Florida
With some help from Bobo and Engunneer, here's a modification of aCkRiTe's code:
Code:
#SingleInstance Force
#NoTrayIcon
#NoEnv
SetBatchLines, -1
DetectHiddenWindows, On

SysGet, Workspace, MonitorWorkArea
Gui, -Caption +ToolWindow +LastFound +AlwaysOnTop +Border
Gui, Color, White
Gui, Font, s14 cRed
Gui, Add, Text, gFade, Your Toast is Ready!`nCOME EAT YOUR TOAST!!!!
Gui, Show, Hide
GUI_ID := WinExist()
WinGetPos, GUIX, GUIY, GUIWidth, GUIHeight, ahk_id %GUI_ID%
NewX := WorkSpaceRight-GUIWidth-5
NewY := WorkspaceBottom-GUIHeight-5
Gui, Show, Hide x%NewX% y%NewY%

DllCall("AnimateWindow","UInt",GUI_ID,"Int",500,"UInt","0x00040008") ; TOAST!
Return

Fade:
DllCall("AnimateWindow","UInt",GUI_ID,"Int",1000,"UInt","0x90000") ; Fade out when clicked
ExitApp

_________________
[Join IRC!]
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 17th, 2007, 6:10 pm 
Offline

Joined: July 21st, 2006, 6:13 am
Posts: 558
Very nice Rhys! Im sure this script will be of use some people. You should also add it to the Scripts and Functions section...

_________________

HTH...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 17th, 2007, 10:05 pm 
Offline

Joined: April 17th, 2007, 1:37 pm
Posts: 761
Location: Florida
aCkRiTe wrote:
Very nice Rhys! Im sure this script will be of use some people. You should also add it to the Scripts and Functions section...

Thanks, I'm still learning... Here's my post in S&F.

_________________
[Join IRC!]
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group