Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extended KotD #20: _NOTIFYPOPUP
#1
Onwards and backwards, as we're now down to the new version 3.4+ keywords!   To start with, let's just start at the top of the list and discuss _NotifyPopUp.

Wiki entry: https://qb64phoenix.com/qb64wiki/index.php/NOTIFYPOPUP
Syntax:    _NOTIFYPOPUP [title$][, message$][, iconType$]

Not at all like our last keyword (BACK!  BACK, EVIL _UCHARPOS!! BACK, I SAY!!), this one is rather simple to make use of and understand.  Smile

A simple SUB, this command will sent one of those annoying little pop-up notifications to your PC, that we all love to hate.  You know the ones I'm talking about -- those little square boxes that usually pop up over in some corner of the screen saying junk like, "Your Firewall is Turned Off.  Do you want to fix it now?".   Or, "We've discovered an update for Spammy Spam-Spam!  Would you like to enable it now?"  Or, "Download finished at 1:13:47AM."

Yeah... This creates THOSE annoying little notification pop-ups.  Tongue

Usage is simple enough that it's almost a waste to go over it.   Call the command, supply it a few parameters.  Presto -- done!!

So what is the command and those parameters??

_NOTIFYPOPUP [title$][, message$][, iconType$]

_NOTIFYPOPUP -- the name of the command!   (Phew!  That was hard to explain!)
title$  -- the title that appears at the top of the notification.
message$ --   the body of text that makes up the message for the notification.
icontype$ -- "info", "error", ot "warning".   Choose from one of those three so your notification will have the corresponding gpahiic stamped on it.

Code: (Select All)
_NOTIFYPOPUP "My Cool App", "Conversion complete!", "info"

Run the above and it'll either do something.... or it won't.  Tongue

If you have notifications turned off, or "Do Not Disturb" turned on, then your system will simply ignore the command and not bother you.  It's not that you did anything wrong, or that the command doesn't work -- it's just that you've disabled notifications and can't recieve them.  (Think of it as turning off your phone and then someone trying to call you...  Nothing happens on your end as the phone is off; but that doesn't mean the other person's phone isn't dialing out, or working as it's supposed to.  You're just not responding to it.)

If notifications are on, and "Do not disturb" is off, then you should see one of those annoying little pop-ups appear at the corner of your screen telling you that an imaginary conversion is now completed.

And that's all there is to it, in a nutshell.  Wink
Reply
#2
aH NOW I know why I didn't remember this keyword, MessageBox seems so much better if one was to bother to get essential info out to the user.
b = b + ...
Reply
#3
I actually like this one and have used it a bit. If I'm saving something to a file, I'll use this as feedback to let me know that things went according to plan.
DO: LOOP: DO: LOOP
sha_na_na_na_na_na_na_na_na_na:
Reply
#4
Yeah I do that too but I want to know my user (and myself) sees it.
b = b + ...
Reply




Users browsing this thread: 1 Guest(s)