menubar

Scripts
  Ping tagserver
    pingDavesTags ()
  Get artwork
    var theTweets = twitter.getUserTimeline ("pablocubist", false)
    function findArt (url) {
      return (undefined);
      }
    function addWorkOfArt (theArt) {
      console.log (jsonStringify (theArt));
      }
    theTweets.forEach (function (theTweet) {
      if (theTweet.entities.media !== undefined) {
        var mediaObject = theTweet.entities.media [0];
        if (mediaObject !== undefined) {
          var urlMedia = mediaObject.media_url;
          var width = mediaObject.sizes.large.w;
          var height = mediaObject.sizes.large.h;
          if (findArt (urlMedia) === undefined) {
            addWorkOfArt ({
              text: theTweet.text,
              url: urlMedia,
              w: width,
              h: height,
              name: screenname,
              id: theTweet.id_str, //7/1/18 by DW -- important to use string, JS can't handle numbers as large as twitter IDs
              when: new Date ()
              });
            }
          }
        }
      });
  Test
  New all-JSS pinger
    function getDayOpml () {
      var opmltext = undefined;
      var oldcursor = opGetCursor ();
      opFirstSummit ();
      var isCalendarMonth = op.attributes.getOne ("type") == "calendarMonth";
      if (isCalendarMonth) {
        opGo (right, 1);
        var isCalendarDay = op.attributes.getOne ("type") == "calendarDay";
        if (isCalendarDay) {
          console.log (op.getLineText ());
          opmltext = op.getCursorOpml ();
          }
        }
      opSetCursor (oldcursor)
      return (opmltext);
      }
    var s = getDayOpml ();
    console.log (s);
  Possible breaker
    function getRandomNumber () {
      if (number.random (101, 102) == 101) {
        return (number.random (100, 200));
        }
      else {
        return ("hello");
        }
      }
    alert (getRandomNumber ());
  Script with local function
    function myname () {
      return ("Bull Mancuso");
      }
    var s = myname ();
    alert (s)
  file.writewholefile test
    function getSomeNumber () {
      return (random (0, 1000));
      }
    file.writeWholeFile ("number.txt", getSomeNumber ())
    dialog.alert (file.readWholeFile ("number.txt"));
  Testing
    Write then read a file
      Notes
        the dialog displays [object Promise]
      file.writeWholeFile ("testing/test.txt", string.filledString ("abc ", 50))
      dialog.alert (file.readWholeFile ("testing/test.txt"))
    Read a file over HTTP
      console.log (http.readUrl ("http://scripting.com/rss.xml"))
    Current file path
      dialog.alert (file.getCurrentFilePath ())
    Current file title
      dialog.alert (file.getCurrentFileTitle ())
    Current file info
      dialog.alert (jsonStringify (file.getCurrentFileInfo ()))
    File list
      dialog.alert (jsonStringify (file.getFileList ()))
    Get cursor OPML
      console.log (op.getCursorOpml ())
      op.expand (1)
      op.go ("down", 1)