Help me fix an error in this old yet still useful function 'Notify()' Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
LG Zana
Posts: 33
Joined: 06 Dec 2021, 17:50

Help me fix an error in this old yet still useful function 'Notify()'

Post by LG Zana » 02 Jun 2023, 12:51

Hello, I really like this Notification function, and I'm using it from this file here. And I have a small problem with it when I left click the notification with my mouse, I get this error. Can anyone help me fix this error?
My code is:

Code: Select all

#Include D:\Notify.ahk

Title := "IDM running. Close it!"
Message := ""
Duration := "6"
Options := "GT=215 GR=5 GC=BLACK TC=White MC=White BC=white BW=10 BR=5"
Notify(Title,Message,Duration,Options)
Sleep, Duration * 1000
ExitApp
and the Error im getting when i left click the Notification is this:

Code: Select all

Error in #include file "D:\Notify.ahk":
     Target label does not exist.

Specifically: _Notify_Flash__Notify_Action_Clicked_

--->	379: SetTimer,_Notify_Flash_%GK%,Off

[Mod edit: Replaced quote tags with code tags. Please use them yourself when posting code.]

User avatar
Spawnova
Posts: 554
Joined: 08 Jul 2015, 00:12
Contact:

Re: Help me fix an error in this old yet still useful function 'Notify()'  Topic is solved

Post by Spawnova » 02 Jun 2023, 17:14

In the notify.ahk file at line 346

Code: Select all

 If (Exit = A_Gui)
  ;ExitApp
Return
it may have something to do with this, I believe the label should end there but because the line above was commented out but the if statement was left in, it means the return may never occur and it flows into the next label causing problems.

I would comment out If (Exit = A_Gui) and see if that solves your problem.

Post Reply

Return to “Ask for Help (v1)”