With this script you can open the unread items of a selected feed in Vienna in either Safari (on per tab) or your default browser. Additionally the script will mark all unread items as read in your selected feed.

Open Vienna, select your feed you want to read and run this script. If you're using Safari you'll need to activate "Enable access for assistive devices" in the Universal Access preference pane (if you haven't already done so). If you're using a browser other than safari you can change

openFeedInSafari(theURL)

to

openFeed(theURL)

in line 18.

In order to run this script more elegantly than double-click it from Finder you may prefer to run it from scriptmenu

  1. set theArticleURLs to {}
  2.  
  3. if UIscript_check() is not false then
  4.     try
  5.         tell application "Vienna"
  6.             activate
  7.             set theArticleList to article of current folder
  8.             repeat with anArticle in theArticleList
  9.                 set theURL to link of anArticle
  10.                 if (read of anArticle is not true) then
  11.                     set theArticleURLs to theArticleURLs & theURL
  12.                 end if
  13.             end repeat
  14.             mark all read in current folder
  15.         end tell
  16.        
  17.         repeat with theURL in theArticleURLs
  18.             openFeedInSafari(theURL)
  19.         end repeat
  20.     on error error_message
  21.         display dialog error_message
  22.     end try
  23. end if
  24.  
  25. on openFeed(anURL)
  26.     ignoring application responses
  27.         open location anURL
  28.     end ignoring
  29. end openFeed
  30.  
  31.  
  32. on openFeedInSafari(anURL)
  33.     my new_tab()
  34.     tell application "Safari"
  35.         set the URL of document 1 to anURL
  36.     end tell
  37. end openFeedInSafari
  38.  
  39. on new_tab()
  40.     try
  41.         tell application "Safari"
  42.             activate
  43.         end tell
  44.         tell application "System Events"
  45.             tell process "Safari"
  46.                 tell menu bar 1
  47.                     tell menu 3
  48.                         click menu item 2
  49.                     end tell
  50.                 end tell
  51.             end tell
  52.         end tell
  53.     on error error_message
  54.         return error_message
  55.     end try
  56. end new_tab
  57.  
  58.  
  59.  
  60.  
  61.  
  62. ----Apple User Interface check----------------------------------------
  63.  
  64. on UIscript_check()
  65.     -- get the system version
  66.     set the hexData to system attribute "sysv"
  67.     set hexString to {}
  68.     repeat 4 times
  69.         set hexString to ((hexData mod 16) as string) & hexString
  70.         set hexData to hexData div 16
  71.     end repeat
  72.     set the OS_version to the hexString as string
  73.     if the OS_version is less than "1030" then
  74.         display dialog "This script requires the installation of " & ¬
  75.             "Mac OS X 10.3 or higher." buttons {"Cancel"} ¬
  76.             default button 1 with icon 2
  77.         return false
  78.     end if
  79.     -- check to see if assistive devices is enabled
  80.     tell application "System Events"
  81.         set UI_enabled to UI elements enabled
  82.     end tell
  83.     if UI_enabled is false then
  84.         tell application "System Preferences"
  85.             activate
  86.             set current pane to ¬
  87.                 pane "com.apple.preference.universalaccess"
  88.             set the dialog_message to "Dieses Script nutzt " & ¬
  89.                 "die eingebaute User Interface Scripting " & ¬
  90.                 "Architektur von Mac OS X, " & ¬
  91.                 "welche momentan deaktiviert ist." & return & return & ¬
  92.                 "Sie können GUI Scripting aktivieren indem Sie " & ¬
  93.                 "die Checkbox “Zugriff für Hilfsgeräte aktivieren” " & ¬
  94.                 "im Bedienungshilfen Einstellungsdialog auswählen."
  95.             display dialog dialog_message buttons {"Abbrechen"} ¬
  96.                 default button 1 with icon 1
  97.         end tell
  98.         return false
  99.     end if
  100.     return true
  101. end UIscript_check