mIRC Home    About    Download    Register    News    Help

Topic Options
#263300 - 05/07/18 04:36 PM mToast - Toast notifications for mIRC (DLL)
Loki12583 Online
Hoopy frood

Registered: 22/01/04
Posts: 1264
Windows toast notifications for mIRC

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

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

$mToast.ShowToast([@Title], @Text, [@Image])
$mToast.ShowToastXml(@Xml, [@Tag], [@Group])

* 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

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

#263305 - 06/07/18 09:41 AM Re: mToast - Toast notifications for mIRC (DLL) [Re: Loki12583]
westor Offline
Hoopy frood

Registered: 27/12/08
Posts: 1511
Loc: Greece
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? -> http://westor.ucoz.com/contact <-

#263308 - 06/07/18 06:30 PM Re: mToast - Toast notifications for mIRC (DLL) [Re: westor]
Loki12583 Online
Hoopy frood

Registered: 22/01/04
Posts: 1264
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.

#263451 - 06/08/18 01:08 PM Re: mToast - Toast notifications for mIRC (DLL) [Re: Loki12583]
klez Offline
Babel fish

Registered: 08/09/15
Posts: 82
Loc: Republic of Moldova
All is fine, but I can't call the callbacks when I'm using ShowToastXml.

When I use:

/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=

Edited by klez (06/08/18 01:13 PM)