new Notify class leveraging Window's Animations from Maestrith

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
Joe Glines
Posts: 770
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

new Notify class leveraging Window's Animations from Maestrith

09 Apr 2020, 11:15

I asked Maestrith to look at gwarble's notify function. He liked the concept but created his own Class which, to me, is much more straight forward and easy to use.

I created a video to demonstrate it's usage. You can watch it below and get the code I demonstrated in the video here. Thanks again Maestrith for the amazing work! Should you like the class, please consider donating a few bucks a few bucks to Maestrith.


Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
burque505
Posts: 1731
Joined: 22 Jan 2017, 19:37

Re: new Notify class leveraging Window's Animations from Maestrith

09 Apr 2020, 12:31

Thank you, Joe. I'm actually a fan of @gwarble's script, and this is equally interesting. Thanks, @maestrith, for creating this.
I did find it necessary to separate out the example(s) from the class to understand what was happening.
In case someone just as obtuse as I am may find it useful, what I ended up with these:
Notify().ahk:
Spoiler
NotifyEx.ahk:
Spoiler
NotifyEx2.ahk:
Spoiler
Regards,
burque505
User avatar
Delta Pythagorean
Posts: 627
Joined: 13 Feb 2017, 13:44
Location: Somewhere in the US
Contact:

Re: new Notify class leveraging Window's Animations from Maestrith

09 Apr 2020, 14:19

Offtopic: I always scream when I see maestrith not put any spaces anywhere in his code lol
Last edited by Delta Pythagorean on 09 Apr 2020, 19:32, edited 1 time in total.

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

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

Re: new Notify class leveraging Window's Animations from Maestrith

09 Apr 2020, 19:24

Delta Pythagorean wrote:
09 Apr 2020, 14:19
Offtopic: I always scream when I see maestrith not put any spaced anywhere in his code lol
Seconded! There’s other on this forum that also do this and it slightly drives me bonkers
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: new Notify class leveraging Window's Animations from Maestrith

09 Apr 2020, 19:26

Also, I wish there was some code that used the actually Windows Animation stuff. AnimateWindow performs quite poorly actually.
User avatar
Joe Glines
Posts: 770
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Re: new Notify class leveraging Window's Animations from Maestrith

10 Apr 2020, 06:32

@Delta Pythagorean @kczx3
Personally I find the spaces a complete waste and HATE them! So let's not use this post as a debate on a personal preference. There is no "right" answer here.
Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
User avatar
Joe Glines
Posts: 770
Joined: 30 Sep 2013, 20:49
Location: Dallas
Contact:

Re: new Notify class leveraging Window's Animations from Maestrith

10 Apr 2020, 06:34

@burque505 I've used gwarble's code for years but I was never a "fan" of how it worked or the way it was implemented. That was why I asked Maestrith to take a look at it. I think he brought it great functionality and made it much more intuitive.

P.S. The code is bound to change as it is new. That's why I didn't want to actually put it in the post as it becomes problematic for people to know which version they are using...
Sign-up for the 🅰️HK Newsletter

ImageImageImageImage:clap:
AHK Tutorials:Web Scraping | | Webservice APIs | AHK and Excel | Chrome | RegEx | Functions
Training: AHK Webinars Courses on AutoHotkey :ugeek:
YouTube

:thumbup: Quick Access Popup, the powerful Windows folders, apps and documents launcher!
malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: new Notify class leveraging Window's Animations from Maestrith

10 Apr 2020, 10:38

kczx3 wrote:
09 Apr 2020, 19:26
Also, I wish there was some code that used the actually Windows Animation stuff. AnimateWindow performs quite poorly actually.
https://www.autohotkey.com/boards/viewtopic.php?t=28834
But it is better to use DirectComposition+Direct3d11+DXGI, but it will be more complex.
https://autohotkey.com/board/topic/95837-samplewin8ahk-h-gui-animation-directcomposition-sample-one/
User avatar
maestrith
Posts: 825
Joined: 16 Oct 2013, 13:52

Re: new Notify class leveraging Window's Animations from Maestrith

11 Apr 2020, 13:06

Delta Pythagorean wrote:
09 Apr 2020, 14:19
Offtopic: I always scream when I see maestrith not put any spaces anywhere in his code lol
I've never really liked spaces. You can use AHK-Studio, select everything, Alt+M Add Space After Comma{Enter} to "fix" it but I have found that having an editor with a good color scheme is enough to break up any code.
John H Wilson III 05/29/51 - 03/01/2020. You will be missed.AHK Studio OSDGUI Creator
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
User avatar
Delta Pythagorean
Posts: 627
Joined: 13 Feb 2017, 13:44
Location: Somewhere in the US
Contact:

Re: new Notify class leveraging Window's Animations from Maestrith

11 Apr 2020, 13:30

maestrith wrote:
11 Apr 2020, 13:06
Delta Pythagorean wrote:
09 Apr 2020, 14:19
Offtopic: I always scream when I see maestrith not put any spaces anywhere in his code lol
I've never really liked spaces. You can use AHK-Studio, select everything, Alt+M Add Space After Comma{Enter} to "fix" it but I have found that having an editor with a good color scheme is enough to break up any code.
I was just joking, I don't mind it, but it does make it a little harder for me to read it. Nothing wrong with it ^^

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

User avatar
elModo7
Posts: 217
Joined: 01 Sep 2017, 02:38
Location: Spain
Contact:

Re: new Notify class leveraging Window's Animations from Maestrith

12 Apr 2020, 09:25

Damn those are flashy, I find them actually quite useful for live streams so that users can redeem things and those pop up on screen.
Appreciated!
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: new Notify class leveraging Window's Animations from Maestrith

20 Jul 2020, 02:10

Great stuff! :thumbup:
Taking your kowledge about the system into account, I asked myself if there's a chance to detect the standard Windows notification/pop-up messages using AHK? Either I haven't used the correct search terms (or I'm kinda meh this time), or we aren't able to make it??? Any advice will be much appreciated. Thx :)
MancioDellaVega
Posts: 83
Joined: 16 May 2020, 12:27
Location: Italy

Re: new Notify class leveraging Window's Animations from Maestrith

20 Jul 2020, 09:59

Thanks, :clap: :clap:
So, if i understand well this notify class does the same things as the notify function but has one code very compact... and seems more fast...
Courses on AutoHotkey
Gewerd_Strauss
Posts: 24
Joined: 12 Nov 2020, 02:34

Re: new Notify class leveraging Window's Animations from Maestrith

15 Apr 2021, 03:10

How can one implement the buttons subroutines now?
In the video, the "click()"-subfunction of the class is altered to make the buttons trigger, which would mean you'd have to create individual versions of the whole class once per script/usecase. I am not sure how I'd fix that "problem" right now.
vava
Posts: 3
Joined: 25 May 2021, 22:08

Re: new Notify class leveraging Window's Animations from Maestrith

04 Aug 2021, 21:03

Joe Glines,
Got a lot of fun playing with this notify. But how to keep the last 3 Message constantly on the screen till the next notify pop up?
Thanks,
HeadOfTheHouse
Posts: 2
Joined: 26 Jul 2016, 09:01

Re: new Notify class leveraging Window's Animations from Maestrith

08 Nov 2021, 12:13

I am trying to use "destroy" option which was added after Joe's video demo. Anyone know the syntax to make this work?
DMDComposer
Posts: 12
Joined: 14 Jul 2018, 18:55
Contact:

Re: new Notify class leveraging Window's Animations from Maestrith

08 Nov 2021, 12:40

HeadOfTheHouse wrote:
08 Nov 2021, 12:13
I am trying to use "destroy" option which was added after Joe's video demo. Anyone know the syntax to make this work?
Hi,

You could try this with the "Delete" method in the notify class. Just a quick example that will leave a notify msg open for long time, then use "z" hotkey to delete the window. You basically need to call the notify class, use the "delete" method which needs the Notify instance ID as its parameter.

Code: Select all

Notify().AddWindow("hi", {Title:"",Time:9999999})
vWinID := Notify().ID
return

z::
Notify().Delete(vWinID)
return
ExitApp

Escape::
ExitApp
Return
HeadOfTheHouse
Posts: 2
Joined: 26 Jul 2016, 09:01

Re: new Notify class leveraging Window's Animations from Maestrith

08 Nov 2021, 14:46

@DMDComposer

Perfect!!!! .Delete worked perfectly! I have been using .Destroy as was listed in the options. Delete works!
Thanks so much DMDComposer!

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: gwarble and 122 guests