mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
mToast
Windows toast notifications for mIRC

Repo: https://github.com/Membear/mToast
Download: https://github.com/Membear/mToast/releases

Features
* Full XML customization
* Simple JSON template
* Supports callback by alias and signal
* Includes module for PM notifications



Usage
Code:
$mToast.ShowToast([@Title], @Text, [@Image])
$mToast.ShowToastXml(@Xml, [@Tag], [@Group])
$mToast.ShowToastJson(@Json)


Notes
* This DLL is written in C#, mIRC compatibility made possible with DllExport package.
* A custom shortcut will be placed in the user's start menu; this is required by Windows for operation.

Requirements and Dependencies
* mIRC v7.44
* Windows 10

References
* 3F/DllExport - https://github.com/3F/DllExport
* Toast design - https://docs.microsoft.com/en-us/windows...eractive-toasts

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
That's a perfect and modern project/DLL, really good work.

I wanna suggest to add an option to set how many seconds we want the notification to stay visible before get hide in notifications bar

e.g: //noop $mToast.ShowToast(TEST,test message,$mircdirmain.ico,60)

60 = Will determine that how many seconds will the notification box will stay active before goes in notifications bar.

- Thanks!


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
You can't set a discrete value for duration, it's limited to short|long (7 or 25 seconds respectively).

By using ShowToastXml this (and all other) elements can already be set. I'll expose 'duration' and 'scenario' to ShowToastJson, but since neither of these are recommended for use (ref) and to keep ShowToast simple, if you want to use any custom attributes use ShowToastXml or ShowToastJson.

Joined: Sep 2015
Posts: 101
Vogon poet
Offline
Vogon poet
Joined: Sep 2015
Posts: 101
All is fine, but I can't call the callbacks when I'm using ShowToastXml.

When I use:

Code:
/dll mToast.dll SetOnCompleteCallback mToast.callback


then using ShowToastXml the callback returns: tag string, where string is TimedOut (when is clicked every button from the toast or single/double/right clicked) or UserCanceled (when is clicked the close button from the Toast).

I tried to use any forms of callback=mToast.callback in XML as given in your examples from the script file, but nothing works, excepts TimedOut or UserCanceled.

Please, can you provide pass-by-pass how to use XML through your DLL and to retrieve the callbacks for every action made in the toast (for example, to tell the mirc that the first button is clicked or the second button etc.)

P.S. No problems are met when I created the toasts using xml configuration. The problems are in the callbacks that can't return the values from arguments=

Last edited by klez; 06/08/18 12:13 PM.

Link Copied to Clipboard