Coder Social home page Coder Social logo

Applescript about vienna-rss HOT 11 OPEN

Atalantia avatar Atalantia commented on September 26, 2024
Applescript

from vienna-rss.

Comments (11)

barijaona avatar barijaona commented on September 26, 2024

I don't have 10.14 to test (I am on macOS 13), and I did not want to delete articles from my database, but these tests worked as expected for me :

tell application "Vienna"
	repeat with x in articles of folders
		if date of x is less than (my (current date)) - 365 * days then display dialog ((title of x) as string)
	end repeat
end tell

and

tell application "Vienna"
	mark all read in folder "Cocoaforge"
end tell

from vienna-rss.

Atalantia avatar Atalantia commented on September 26, 2024

tell application "Vienna" to mark all read in folder "Old"
Does NOT work on 10.14.6 on a smart folder.

from vienna-rss.

barijaona avatar barijaona commented on September 26, 2024

tell application "Vienna" to mark all read in folder "Old"
Does NOT work on 10.14.6 on a smart folder.

Works here (macOS 13)
I will setup a 10.13 virtual machine (probably this week-end) and I will investigate

Does opening of Vienna's dictionary in Script Editor works as expected ?

from vienna-rss.

barijaona avatar barijaona commented on September 26, 2024

Also: can you check if you have the same issue with Vienna 3.7.5 ?

from vienna-rss.

Atalantia avatar Atalantia commented on September 26, 2024

I have 3.8.4.

  1. Look, the command:
    tell application "Vienna" to mark all read in folder "Old"
    sets the articles in the selected folder in Vienna to "mark as read" Means the frontmost folders content gets, marked as read. But not the folder mentioned in the script "Old"

  2. The "delete" command I cant make it work on any articles.

from vienna-rss.

barijaona avatar barijaona commented on September 26, 2024

Problem confirmed. I will have a look.

  1. Look, the command:
    tell application "Vienna" to mark all read in folder "Old"
    sets the articles in the selected folder in Vienna to "mark as read" Means the frontmost folders content gets, marked as read. But not the folder mentioned in the script "Old"
  2. The "delete" command I cant make it work on any articles.

from vienna-rss.

Eitot avatar Eitot commented on September 26, 2024

Is this a regression in #1481?

from vienna-rss.

barijaona avatar barijaona commented on September 26, 2024

Is this a regression in #1481?

Quite possible for the first problem, which does not appear on 3.8.0_Beta1

For the second problem, I guess they were discrepancies in ViennaApp.scriptSuite / ViennaApp.scriptTerminology which were transposed in Vienna.sdef

from vienna-rss.

Eitot avatar Eitot commented on September 26, 2024

@barijaona: Problem 1 works differently for me. When I want to mark folder X as read but have folder Y selected, it marks both folders as read. This isn't a bug in AppleScript, but in Vienna itself, specifically this part here:

Folder * currentFolder = [[Database sharedManager] folderFromID:currentFolderId];
if (currentFolder != nil && ![folderArray containsObject:currentFolder])
{
for (Article * theArticle in folderArrayOfArticles)
[theArticle markRead:YES];
}

It marks every article in folderArrayOfArticles as read, which includes more than just the articles of folder X.

As for problem 2, the Vienna scripting definition has no methods for the Article and Folder objects, only properties. The ViennaApp object does have methods and some of them take Article or Folder objects as arguments. This is indeed something that Vienna didn't have before. In this specific case, the delete command is actually not defined by Vienna, but by the "standard suite" provided by Cocoa. It doesn't seem to recognise Article or Folder objects as valid arguments for the delete command.

from vienna-rss.

github-actions avatar github-actions commented on September 26, 2024

This issue hasn't been updated in a while so we're going to mark it as stale. stale issues will automatically be closed after 60 days of inactivity. If this issue is still affecting you, please update us on how it affects you, and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. Thank you for your contributions.

from vienna-rss.

barijaona avatar barijaona commented on September 26, 2024

Vienna's support for AppleScript is not very satisfactory:

  • some features are listed in the .sdef but are not operational; this is frustrating for users; we should at least tidy things up;
  • on the other hand, we need to identify the functions that would be most useful to scripters.

The current implementation clearly needs some refactoring, but I think it's worth the effort. It might also help with Shortcuts support.

Related: issue #1523

from vienna-rss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.