Example Code

Web Site Change Notification Suite

Code and Documents

Attachment

Introduction

This VI is a small project I put together to monitor a web page, and notify the user when it has changed via multiple methods including pop up dialog, opening the page in the default browser, and sending a text message to a list of recipients.  I originally created it for buying concert tickets that were a very hot item.  The tickets sold out within 3 minutes, and I was one of the few people who got them.

Steps to Complete

The VI is pretty straightforward to understand.  Simply open and run the Web Site Notifier.vi.  If this is the first time using the VI you will get a pop up asking for the site URL and parameters to filter (See Filter Text (Variable) for information on this).

URL Dialog.png

Then the main window will open allowing you to set options such as the Refresh Rate, dialog timeout and Text message options.

URL Change notifier.png

Open URL in Default Browser

When the page in question changes, you will first see it pop up in the default browser.  This will allow you to make sure that it was the real update you were looking for and not a false alarm.

Dialog

At the same time as the browser opening, a dialog will pop up asking you if the URL is real or fake.  If you select fake, nothing will happen and the program will continue to check the page again.  If you select Real, it will send a text message to anyone on the announcement list.  If no response is select within the "Dialog Timeout" time limit, then the program will assume that it's real and you are too busy buying your tickets to care about a popup.  It will then automatically close and send the text message.

Send Text Message

If the change is real or the user hasn't selected an option within the Dialog Timeout limit, the program will automatically send a text message as configured in the Text message options.

  • Mail Server must be a valid outgoing mail server.
  • Return address can be any valid or invalid email address, but must be correctly formatted (username@server.com)
  • 10 digit cell phone numbers must be in the format 5551234567
  • You must choose the correct cell phone provider, as the mailto address will be different for each. 
  • To add an entry to the list, simply type in the next available array element.
  • To remove from the list, type the name to delete and press the delete button.

Kudos

Thanks to CaptainKirby for his Mass SMS Message Example and A_Patel for his Woot Off Checker

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
xander.huff
Member
Member
on

It would be nice if you could change the website you're checking without having to go delete the sitechecker.file

David_L
Active Participant
Active Participant
on

True.  There's probably a lot of little things I could do to fix this up after looking at it for the first time in a year.  To be totaly honest, it was a very quick coding project I put together last year to buy ACL tickets, so feel free to make changes and add it/update it here...

xander.huff
Member
Member
on

Ha, that's exactly why a couple of us in RIO are trying it out

Contributors