How to generate tray icon balloon messages

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
gknopf
Newbie
Posts: 12
Joined: Thu Feb 10, 2011 11:11 pm
Location: Germany

How to generate tray icon balloon messages

Post by gknopf » Sat Jul 16, 2011 10:44 am

Hi everyone,

is there a possibility to generate tray icon balloon messages without using forms? They should disappear after a few seconds again.

Thanks in advance for your help.

Best regards
George

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Thu Mar 20, 2014 11:13 am

Does anyone have a script to be able to do this?
FIREFIGHTER

User avatar
JRL
Automation Wizard
Posts: 3531
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Mar 21, 2014 2:12 pm

Not sure I understand the question. What is meant by "without using forms?"?

Doesn't Rain demonstrate techniques that could be used in this Scripts and Tips thread

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Fri Mar 21, 2014 3:13 pm

Not a tray icon, I want to be a le to generate the windows balloon message / tip that pops up.
FIREFIGHTER

User avatar
JRL
Automation Wizard
Posts: 3531
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Mar 21, 2014 3:23 pm

Still not understanding. Can you tell me step by step what you want. From my understanding of the original question everything that's needed is in Rain's sample.

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Fri Mar 21, 2014 11:35 pm

That is for a popup menu from the tray icon.

I am wanting a way to show the windows balloon notification. Eg when you first install ms and run it the first time you get the notification balloon popup.

https://www.google.com/search?q=balloon ... ErqsqiMFU#
FIREFIGHTER

User avatar
JRL
Automation Wizard
Posts: 3531
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Sat Mar 22, 2014 5:51 am

This is probably not what you want but I don't see any other way of doing what I think of as a cartoon talk bubble.

As written the balloon will display at your cursor position when you run the script.

See the Pie API parameters described HERE


Code: Select all

Dialog>Dialog1
object Dialog1: TForm
  BorderStyle = bsNone
  ClientHeight = 65
  ClientWidth = 250
  object Panel1: TPanel
    Left = 0
    Top = 0
    Width = 250
    Height = 50
    BevelOuter = bvNone
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -13
    Font.Name = 'MS Sans Serif'
    Font.Style = [fsBold]
    ParentFont = False
    TabOrder = 0
  end
end
EndDialog>Dialog1

SetDialogProperty>Dialog1,,Color,1111
SetDialogProperty>Dialog1,Panel1,Color,11728890
SetDialogProperty>Dialog1,Panel1,ParentColor,False
SetDialogProperty>Dialog1,Panel1,ParentBackGround,False
SetDialogProperty>Dialog1,,TransparentColor,True
SetDialogProperty>Dialog1,,TransparentColorValue,1111

SetDialogProperty>Dialog1,Panel1,Caption,Point the bubble at your mouse.

GetCursorPos>CurX,CurY
Sub>CurX,200
Sub>CurY,65
Let>WIN_USEHANDLE=1
  MoveWindow>Dialog1.handle,CurX,CurY
Let>WIN_USEHANDLE=0

Show>dialog1

//GoSub>DrawPie,WindowHandle,PenSize,PenColor,SolidColor,ULXLoc,ULYLoc,LRXLoc,LRYLoc,Xrot1,Yrot1,Xrot2,Yrot2
GoSub>DrawPie,Dialog1.handle,1,11728890,11728890,150,30,250,100,190,30,70,0

Wait>2

SRT>DrawPie
  LibFunc>user32,GetDC,HDC,%DrawPie_var_1%
  LibFunc>gdi32,CreatePen,Penres,0,%DrawPie_var_2%,%DrawPie_var_3%
  LibFunc>gdi32,SelectObject,SOPres,hdc,Penres
  LibFunc>gdi32,CreateSolidBrush,SBres,%DrawPie_var_4%
  LibFunc>gdi32,SelectObject,SOres,hdc,sbres
  LibFunc>gdi32,Pie,recres,hdc,%DrawPie_var_5%,%DrawPie_var_6%,%DrawPie_var_7%,%DrawPie_var_8%,%DrawPie_var_9%,%DrawPie_var_10%,%DrawPie_var_11%,%DrawPie_var_12%
  LibFunc>gdi32,DeleteObject,DOres,Penres
  LibFunc>gdi32,DeleteObject,DOres,sbres
  LibFunc>user32,ReleaseDC,RDCres,HDC_1,HDC
END>DrawPie

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Sat Mar 22, 2014 11:01 am

Not the native windows one, but still quite impressive thank you for that code.
FIREFIGHTER

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Re: How to generate tray icon balloon messages

Post by CyberCitizen » Thu Nov 03, 2016 3:07 am

After not being able to find an easy way to launch a Windows Balloon popup I have found https://www.paralint.com/projects/notifu/ to work really well for my needs, its a little on the large size, so adding it to your scripts etc will blow out the size a bit but works well and can throw various variables at it and it will also use the icon of the program launching it (eg if you are using a complied exe).
FIREFIGHTER

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts