From a30f050339c6843de2760c0de24bb4df6d39b6a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Schwaiger?= Date: Sun, 25 Jun 2023 14:40:10 +0200 Subject: [PATCH 1/3] AppleScript: Fix name of property --- AppleScript/Excel-CreateFeedStatisticsSpreadsheet.applescript | 4 ++-- AppleScript/Safari-OpenAllStarredArticles.applescript | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AppleScript/Excel-CreateFeedStatisticsSpreadsheet.applescript b/AppleScript/Excel-CreateFeedStatisticsSpreadsheet.applescript index 1ba58fd8f..e9d6f32c6 100644 --- a/AppleScript/Excel-CreateFeedStatisticsSpreadsheet.applescript +++ b/AppleScript/Excel-CreateFeedStatisticsSpreadsheet.applescript @@ -1,4 +1,4 @@ --- This script creates an Excel spreadsheet with statistics about all the feeds in your NetNewsWire +-- This script creates an Excel spreadsheet with statistics about all the feeds in your NetNewsWire -- the exportToExcel() function creates a single line of data in a spreadsheet @@ -36,7 +36,7 @@ set totalFeeds to 0 tell application "NetNewsWire" set allAccounts to every account repeat with nthAccount in allAccounts - set userFeeds to allFeeds of nthAccount + set userFeeds to allWebFeeds of nthAccount repeat with nthFeed in userFeeds set feedname to name of nthFeed set articleCount to count (get every article of nthFeed) diff --git a/AppleScript/Safari-OpenAllStarredArticles.applescript b/AppleScript/Safari-OpenAllStarredArticles.applescript index 81fe85cc0..052738c9f 100644 --- a/AppleScript/Safari-OpenAllStarredArticles.applescript +++ b/AppleScript/Safari-OpenAllStarredArticles.applescript @@ -38,7 +38,7 @@ set safariWindow to missing value tell application "NetNewsWire" set allAccounts to every account repeat with nthAccount in allAccounts - set userFeeds to allFeeds of nthAccount + set userFeeds to allWebFeeds of nthAccount repeat with nthFeed in userFeeds set starredArticles to (get every article of nthFeed where starred is true) repeat with nthArticle in starredArticles From 15076543cb5a65e70f7f9648a46a2e65dae33d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Schwaiger?= Date: Sun, 25 Jun 2023 14:46:50 +0200 Subject: [PATCH 2/3] AppleScript: Only check active accounts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this update running the script would fail, with the error: > NetNewsWire got an error: Can’t get account id "OnMyMac". if some accounts, such as “On My Mac”, were not active. --- AppleScript/Excel-CreateFeedStatisticsSpreadsheet.applescript | 4 ++-- AppleScript/Safari-OpenAllStarredArticles.applescript | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AppleScript/Excel-CreateFeedStatisticsSpreadsheet.applescript b/AppleScript/Excel-CreateFeedStatisticsSpreadsheet.applescript index e9d6f32c6..403c169dc 100644 --- a/AppleScript/Excel-CreateFeedStatisticsSpreadsheet.applescript +++ b/AppleScript/Excel-CreateFeedStatisticsSpreadsheet.applescript @@ -34,8 +34,8 @@ end tell set totalFeeds to 0 tell application "NetNewsWire" - set allAccounts to every account - repeat with nthAccount in allAccounts + set allActiveAccounts to every account where active is true + repeat with nthAccount in allActiveAccounts set userFeeds to allWebFeeds of nthAccount repeat with nthFeed in userFeeds set feedname to name of nthFeed diff --git a/AppleScript/Safari-OpenAllStarredArticles.applescript b/AppleScript/Safari-OpenAllStarredArticles.applescript index 052738c9f..93523c084 100644 --- a/AppleScript/Safari-OpenAllStarredArticles.applescript +++ b/AppleScript/Safari-OpenAllStarredArticles.applescript @@ -36,8 +36,8 @@ set safariWindow to missing value --for each one of those, open a new tab in Safari tell application "NetNewsWire" - set allAccounts to every account - repeat with nthAccount in allAccounts + set allActiveAccounts to every account where active is true + repeat with nthAccount in allActiveAccounts set userFeeds to allWebFeeds of nthAccount repeat with nthFeed in userFeeds set starredArticles to (get every article of nthFeed where starred is true) From 52aa206db5885ef65cf09e65f0e48bdc703ab09b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Schwaiger?= Date: Sun, 25 Jun 2023 16:23:58 +0200 Subject: [PATCH 3/3] AppleScript: Fix minor spelling mistakes --- AppleScript/Safari-OpenAllStarredArticles.applescript | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AppleScript/Safari-OpenAllStarredArticles.applescript b/AppleScript/Safari-OpenAllStarredArticles.applescript index 93523c084..854494a97 100644 --- a/AppleScript/Safari-OpenAllStarredArticles.applescript +++ b/AppleScript/Safari-OpenAllStarredArticles.applescript @@ -12,10 +12,10 @@ to openTabInSafari(theUrl) if (my safariWindow is missing value) then -- first time through, make a new window with the given url in the only tab set newdoc to make new document at front with properties {URL:theUrl} - -- because we created the doucument "at front", we know it is window 1 + -- because we created the document "at front", we know it is window 1 set safariWindow to window 1 else - -- after the first time, make a new tab in the wndow we created the first tim + -- after the first time, make a new tab in the window we created the first tim tell safariWindow make new tab with properties {URL:theUrl} end tell @@ -25,7 +25,7 @@ end openTabInSafari -- the script starts here --- First, initialize safariWindow to be missing value, so that the first time through +-- First, initialize safariWindow to be missing value, so that the first time through -- openTabInSafari() we'll make a new window to hold all our articles set safariWindow to missing value