Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Program Assistance

Featured Replies

Posted

I use the following program to send me NOAA Weather alerts. It works as intended. However, the program repeats the Then commands every time the NOAA Plug-in Polls NOAA if the alert hasn't changed.

Is there something I can change in my program to eliminate repeating the 'The" commands?

Thank you!

 

If
        'Plug-Ins / NOAA Weather' Alert is Blizzard Warning
 
Then
        Set 'Plug-Ins / Notification Controller / UD Mobile' Send Message Sound 'Small Resonant Alarm' Content 96 Notification ID (ID=96)
        $Blizzard_Warning  = 1
 
Else
        $Blizzard_Warning  = 0
 

Solved by EWhite

Go to solution

Edit.. Forgot about the else, I think my suggestion will also toggle back and forth

 

I would try adding/testing to the if:

And
        $Blizzard_warning not equal 1

I'm assuming that it stays 1 during the blizzard and doesn't toggle back and forth

 

Edited by paulbates
forgot about the else

  • Author
2 minutes ago, paulbates said:

I would try adding/testing to the if:

And
        $Blizzard_warning not equal 1

I'm assuming that it stays 1 during the blizzard and doesn't toggle back and forth

 

The variable does stay at 1 as long as NOAA has a Blizzard Warning alert. It does not toggle back and forth. 

If I add  $Blizzard_warning not equal 1 as you suggest, how does that stop the program from running the "Then" portion of the program?

To add more information. We went from a Winter Storm Warning to a Blizzard Warning and my Winter Storm notification is triggering. It appears that even though the alert changed the old alert is still there.

  • Solution

just have the "then" set the variable.. then add another program triggered by that variable...easiest fix...

 

If
        'Plug-Ins / NOAA Weather' Alert is Blizzard Warning
 
Then
        $Blizzard_Warning  = 1
 
Else
        $Blizzard_Warning  = 0



If
        $Blizzard_Warning  = 1
 
Then
        Set 'Plug-Ins / Notification Controller / UD Mobile' Send Message Sound 'Small Resonant Alarm' Content 96 Notification ID (ID=96)
        
 

        

 

  • Author
17 hours ago, EWhite said:

just have the "then" set the variable.. then add another program triggered by that variable...easiest fix...

 

If
        'Plug-Ins / NOAA Weather' Alert is Blizzard Warning
 
Then
        $Blizzard_Warning  = 1
 
Else
        $Blizzard_Warning  = 0



If
        $Blizzard_Warning  = 1
 
Then
        Set 'Plug-Ins / Notification Controller / UD Mobile' Send Message Sound 'Small Resonant Alarm' Content 96 Notification ID (ID=96)
        
 

        

 

Thank you, @EWhite! This solved my issue.

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.