mIRC Homepage

mToast - Toast notifications for mIRC (DLL)

Posted By: Loki12583

mToast - Toast notifications for mIRC (DLL) - 05/07/18 03:36 PM

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
Posted By: westor

Re: mToast - Toast notifications for mIRC (DLL) - 06/07/18 08:41 AM

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!
Posted By: Loki12583

Re: mToast - Toast notifications for mIRC (DLL) - 06/07/18 05:30 PM

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.
Posted By: klez

Re: mToast - Toast notifications for mIRC (DLL) - 06/08/18 12:08 PM

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=
© 2019 mIRC Discussion Forums