Rob van der Woude's Scripting Pages

Help text for dialogboxes

(view help text of dialogboxes as plain text)

Help for SystemTrayMessage class
─────────────────────────────────

Present an icon in the notification area (system tray) with an optional tooltip balloon, and return whether the icon or tooltip were clicked


COM ProgID: RobvanderWoude.SystemTrayMessage


┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                                                              │
│ Properties        (Note that all properties are string or integer, no booleans, objects or arrays)                                           │
│                                                                                                                                              │
╞══════════════════╤════════════════════════════════════════════════════╤═══════════╤═══════════╤══════════════════════════════════════════════╡
│ Property Name    │ Description                                        │ Mandatory │ Read-Only │ Default (Allowed) Values                     │
╞══════════════════╪════════════════════════════════════════════════════╪═══════════╪═══════════╪══════════════════════════════════════════════╡
│ balloonclicked   │ Will be 1 (true) if wait is 1 (true) and the       │ N/A       │ YES       │                                              │
│                  │ tooltip balloon was clicked before timeout         │           │           │                                              │
│                  │ elapsed (0=false; 1=true)                          │           │           │                                              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ debuginfo        │ A log of actions for debugging                     │ N/A       │ YES       │                                              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ errors           │ List of errors with current settings               │ N/A       │ YES       │                                              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ escapemessage    │ Interpret \n as newline and \t as tab in message   │ no        │ no        │ 1                                            │
│                  │ (0=false; 1=true)                                  │           │           │                                              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ iconfile         │ Either an icon file (*.ico) or an icon library     │ no        │ no        │ icon #277 in shell32.dll                     │
│                  │ (*.dll or *.exe) containing the icon to be used    │           │           │                                              │
│                  │ in notification area                               │           │           │                                              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ iconindex        │ Index of icon in icon library iconfile             │ no        │ no        │ 277 if iconfile is shell32.dll               │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ message          │ Tooltip message (if empty, no tooltip is shown)    │ no        │ no        │                                              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ timeout          │ Optional dialog timeout in seconds  (0=no timeout) │ no        │ no        │ 10                                           │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ title            │ Dialog window title                                │ no        │ no        │ DialogBoxes.dll,  Version 0.18.1.0           │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ tooltipicon      │ Icon shown in the tooltip balloon (use             │ no        │ no        │ Info (None, Info, Warning, Error))           │
│                  │ ListToolTipIcons( ) for a list of available icons) │           │           │                                              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ Version          │ Show this DLL's version                            │ N/A       │ YES       │                                              │
├──────────────────┼────────────────────────────────────────────────────┼───────────┼───────────┼──────────────────────────────────────────────┤
│ wait             │ Wait for timeout to elapse       (0=false; 1=true) │           │           │ 1                                            │
│                  │ (if 1, script will wait until either tooltip       │           │           │                                              │
│                  │ balloon is clicked or timeout elapses, if 0        │           │           │                                              │
│                  │ script will continue without waiting, but          │           │           │                                              │
│                  │ "balloonclicked" status will not be available)     │           │           │                                              │
└──────────────────┴────────────────────────────────────────────────────┴───────────┴───────────┴──────────────────────────────────────────────┘


┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                                                                                              │
│ Methods                                                                                                                                      │
│                                                                                                                                              │
╞══════════════════╤════════════════════════════════════════════════════════════════════════════╤══════════════════════════════════════════════╡
│ Method Name      │ Description                                                                │ Requirements                                 │
╞══════════════════╪════════════════════════════════════════════════════════════════════════════╪══════════════════════════════════════════════╡
│ CheckUpdate      │ Check the developer's website for updates                                  │                                              │
├──────────────────┼────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────┤
│ Credits          │ Shows credits                                                              │                                              │
├──────────────────┼────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────┤
│ Help             │ Returns this help text as plain text, or if optional parameter equals 1,   │                                              │
│                  │ as html                                                                    │                                              │
├──────────────────┼────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────┤
│ ListProperties   │ Returns a list of this class' properties as key=value pairs (1 per line)   │                                              │
├──────────────────┼────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────┤
│ ListToolTipIcons │ Return a semicolon-separated list of available icons                       │                                              │
├──────────────────┼────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────┤
│ SampleCode       │ Returns VBScript sample code for this dialog                               │                                              │
├──────────────────┼────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────┤
│ Show             │ Presents an icon in the notification area (system tray) with an optional   │                                              │
│                  │ tooltip balloon; if the program is set to continue without waiting, then   │                                              │
│                  │ that's all; if the program is set to wait for the timeout to elapse,       │                                              │
│                  │ clicking the tooltip balloon sets "balloonclicked" property and aborts     │                                              │
│                  │ the program.                                                               │                                              │
└──────────────────┴────────────────────────────────────────────────────────────────────────────┴──────────────────────────────────────────────┘


VBScript usage example:
───────────────────────

Set objSystemTrayMessage = CreateObject( "RobvanderWoude.SystemTrayMessage" )

With objSystemTrayMessage
	.message = "It is time for your daily backup." & vbCrLf & "Please save and close all documents," & vbCrLf & "and click this message when ready."
	.title = "Backup Time"
	.timeout = 1800
	.wait = 1
	WScript.Echo .ListProperties( )
	WScript.Echo
	.Show
	If .balloonclicked Then
		WScript.Echo "You clicked the tooltip balloon before the timeout elapsed"
	End If
End With

Set objSystemTrayMessage = Nothing

page last uploaded: 2022-10-05; loaded in 0.0206 seconds