Notify - Display Notifications GUIs

Post your working scripts, libraries and tools.
XMCQCX
Posts: 254
Joined: 14 Oct 2020, 23:44

Notify - Display Notifications GUIs

Post by XMCQCX » 06 May 2024, 17:20

Notify
This class makes it easier to create and display notification GUIs.

Features
  • Changing text, image, font, color, animation.
  • Rounded or edged corners.
  • Positioning at different locations on the screen.
  • Playing sound when it appears.
  • Call function when clicking on it.
Inspired by the Automator Notify Class and the original Notify function by gwarble. I attempted to modify it. However, I struggled to comprehend the code, so I created my own version.

For the latest version of this script, documentation and examples, head over to the GitHub page.
:arrow: Download on GitHub

Image
Last edited by XMCQCX on 31 May 2024, 19:52, edited 9 times in total.

songdg
Posts: 619
Joined: 04 Oct 2017, 20:04

Re: Notify - Display Notifications GUIs

Post by songdg » 06 May 2024, 22:19

Wonderful, thanks for sharing :clap:

reddyshyam
Posts: 47
Joined: 24 Jul 2023, 04:34

Re: Notify - Display Notifications GUIs

Post by reddyshyam » 07 May 2024, 10:49

Hi @XMCQCX ,

Thanks for this, much appreciated! I have been using a wonderful script WiseGUI which is just brilliant and I love it. I noticed that WiseGUI lacks html support but it was not a problem at all

Will try to use your lib just for thrill of it and change where ever I would want sound notifications and html content.

It would be nice to show some screenshots too so that we know what we get before we start using it. :) Hope this is ok.

XMCQCX
Posts: 254
Joined: 14 Oct 2020, 23:44

Re: Notify - Display Notifications GUIs

Post by XMCQCX » 07 May 2024, 14:26

reddyshyam wrote:
07 May 2024, 10:49
It would be nice to show some screenshots too so that we know what we get before we start using it. :) Hope this is ok.
Hi @reddyshyam. Thanks for the suggestion! I’ve updated my post with screenshots.

User avatar
kczx3
Posts: 1649
Joined: 06 Oct 2015, 21:39

Re: Notify - Display Notifications GUIs

Post by kczx3 » 09 May 2024, 08:20

XMCQCX wrote:
07 May 2024, 14:26
reddyshyam wrote:
07 May 2024, 10:49
It would be nice to show some screenshots too so that we know what we get before we start using it. :) Hope this is ok.
Hi @reddyshyam. Thanks for the suggestion! I’ve updated my post with screenshots.
You did?

XMCQCX
Posts: 254
Joined: 14 Oct 2020, 23:44

Re: Notify - Display Notifications GUIs

Post by XMCQCX » 10 May 2024, 08:10

Updated to 1.1.0

- Added a new parameter for destroying currently existing GUIs or not when a new GUI is created.
- Added a GUI to list and hear all the available sounds. Call Notify.SoundsList()
- Sound parameter. Allow using 'Windows Ding', for instance, instead of Notify.mSounds['Windows Ding'].

User avatar
Delta Pythagorean
Posts: 628
Joined: 13 Feb 2017, 13:44
Location: Somewhere in the US
Contact:

Re: Notify - Display Notifications GUIs

Post by Delta Pythagorean » 13 May 2024, 16:02

Instead of having 18 parameters for one function, needing to remember the position for each one, why not use an object to pass individual parameters?

Code: Select all

Notify.Show({ body_text: "Lorem ipsum", icon: "x", style: "round", duration: 5 * 1000 })

[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat


XMCQCX
Posts: 254
Joined: 14 Oct 2020, 23:44

Re: Notify - Display Notifications GUIs

Post by XMCQCX » 15 May 2024, 05:58

@Delta Pythagorean I weighed the pros and cons of passing a single object versus passing multiple parameters and hesitated about which one to choose. Ultimately, I chose individual parameters because the thqby v2 language support extension has intelligent prompts for function parameters, which allow a user to see the parameter when typing. However, you are right that using 18 parameters is not optimal. I will probably update it in the next few days to be similar to the original notify v1 by gwarble, in this format:

Code: Select all

Notify.Show('Title text', 'Message Text', 'iconi', 'soundx',, 'TS=35 POS=TL DUR=8 DG=2')
Last edited by XMCQCX on 18 May 2024, 17:06, edited 1 time in total.

XMCQCX
Posts: 254
Joined: 14 Oct 2020, 23:44

Re: Notify - Display Notifications GUIs

Post by XMCQCX » 18 May 2024, 15:51

Updated to 1.2.0
WARNING! This version introduces BREAKING CHANGES if GUIs were created using the previous versions.

- Reduced number of parameters from 18 to 6.
- Added methods for destroying GUIs.
- Added center positioning.
- Added animate window duration option.
- Duration option now in seconds instead of milliseconds.
- Added JSDoc documentation.

XMCQCX
Posts: 254
Joined: 14 Oct 2020, 23:44

Re: Notify - Display Notifications GUIs

Post by XMCQCX » 31 May 2024, 20:03

Updated to 1.3.0

- Added an option to choose the animation when showing and hiding the GUI, such as fade, slide, roll etc. Only the fade animation is rendered correctly with the round style.
- Removed the AWD (Animation Window Duration) option and replaced it with SHOW and HIDE options inspired by WiseGui by @SKAN. The new format is 'STYLE=EDGE SHOW=Fade@125 HIDE=SlideEast@500'.
- Fixed the "Gui has no window" bug when using the DG (Destroy GUIs) option.
- Added options for message alignment and border.

wjt936826577
Posts: 6
Joined: 11 Jun 2023, 07:54

Re: Notify - Display Notifications GUIs

Post by wjt936826577 » 04 Jun 2024, 09:56

Great program, but because of the static methods and properties used, when I create a window that is not closed, it becomes difficult to programmatically close it, I don't know if there is a solution

XMCQCX
Posts: 254
Joined: 14 Oct 2020, 23:44

Re: Notify - Display Notifications GUIs

Post by XMCQCX » 04 Jun 2024, 17:12

wjt936826577 wrote:
04 Jun 2024, 09:56
it becomes difficult to programmatically close it, I don't know if there is a solution.
In this version (1.3.0), it’s not possible to programmatically close a specific GUI; you can only destroy all GUIs or destroy all GUIs at a specific position. I’ve included a method to close a specific GUI in my test version. It will most likely be included in the next update.

wjt936826577
Posts: 6
Joined: 11 Jun 2023, 07:54

Re: Notify - Display Notifications GUIs

Post by wjt936826577 » 04 Jun 2024, 20:00

XMCQCX wrote:
04 Jun 2024, 17:12
wjt936826577 wrote:
04 Jun 2024, 09:56
it becomes difficult to programmatically close it, I don't know if there is a solution.
In this version (1.3.0), it’s not possible to programmatically close a specific GUI; you can only destroy all GUIs or destroy all GUIs at a specific position. I’ve included a method to close a specific GUI in my test version. It will most likely be included in the next update.
good job!

wjt936826577
Posts: 6
Joined: 11 Jun 2023, 07:54

Re: Notify - Display Notifications GUIs

Post by wjt936826577 » 05 Jun 2024, 06:35

Why can you show pictures, don't you only show ICONS

wjt936826577
Posts: 6
Joined: 11 Jun 2023, 07:54

Re: Notify - Display Notifications GUIs

Post by wjt936826577 » 05 Jun 2024, 07:26

SHOW=SLIDEWEST,When it slides out, there is a white window at first

wjt936826577
Posts: 6
Joined: 11 Jun 2023, 07:54

Re: Notify - Display Notifications GUIs

Post by wjt936826577 » 05 Jun 2024, 08:26

It is recommended set dur as a separate parameter, because the duration parameter is usually passed by program

wjt936826577
Posts: 6
Joined: 11 Jun 2023, 07:54

Re: Notify - Display Notifications GUIs

Post by wjt936826577 » Yesterday, 07:40

'i)(\w+)=((?:.*?)(?=\s+\w+=|$))',The regular expression in the program can be simplified to 'i)(\w+)=(.*?(?=\s+\w+=|$))'

XMCQCX
Posts: 254
Joined: 14 Oct 2020, 23:44

Re: Notify - Display Notifications GUIs

Post by XMCQCX » Yesterday, 19:46

wjt936826577 wrote:
05 Jun 2024, 06:35
Why can you show pictures, don't you only show ICONS
What do you mean?
wjt936826577 wrote:
Yesterday, 07:40
'i)(\w+)=((?:.*?)(?=\s+\w+=|$))' The regular expression in the program can be simplified to 'i)(\w+)=(.*?(?=\s+\w+=|$))'
Thanks, I’ve modified it in my test version. I will probably release the next update next week. I’ve added multi-monitor support, multi-script stacking, and other options.

Post Reply

Return to “Scripts and Functions (v2)”