Savanna
Harmless
Posts: 3 Joined: Tue Nov 22, 2022 9:20 am
Post
by Savanna » Tue Nov 22, 2022 9:26 am
Hello,
please can someone provide a few Applescript examples? I tryed a lot but I cant get the delete command working,
eg
Code: Select all
tell application "Vienna"
repeat with x in (articles of folders)
if date of x is less than (my (current date)) - 3 * days then delete x
end repeat
end tell
for:
Code: Select all
tell application "Vienna"
delete (article 677)
end tell
I get:
Code: Select all
error "„Vienna“ got an error: „article 677“ can't read." number -1728 from article 677
Don't know how to implement that.
Savanna
Harmless
Posts: 3 Joined: Tue Nov 22, 2022 9:20 am
Post
by Savanna » Wed Nov 23, 2022 3:46 am
Yes, I thought so. This is a dead forum. The developer doesn't care and the software all in all is crap. The Applescript implemented sloppy and doesn't work at all.
pukku
Harmless
Posts: 21 Joined: Sat Dec 08, 2007 4:11 am
Post
by pukku » Wed Nov 23, 2022 12:15 pm
- you might have better luck over on the GitHub issues queue?
https://github.com/ViennaRSS/vienna-rss
- AppleScript is weird in a lot of applications, but maybe you can move the items to the trash folder instead of deleting them?
Savanna
Harmless
Posts: 3 Joined: Tue Nov 22, 2022 9:20 am
Post
by Savanna » Wed Nov 23, 2022 4:04 pm
pukku wrote: ↑ Wed Nov 23, 2022 12:15 pm
- you might have better luck over on the GitHub issues queue?
https://github.com/ViennaRSS/vienna-rss
- AppleScript is weird in a lot of applications, but maybe you can move the items to the trash folder instead of deleting them?
Thanks pukku. Move generates the same error.
philmur
Harmless
Posts: 5 Joined: Sun Feb 16, 2020 4:52 am
Post
by philmur » Thu Nov 24, 2022 12:13 am
It seems one can only get the properties of
folder and
article objects, but not otherwise act on them. Not sure why this is
(AppleEvent handler failed." number -10000) .
Working examples:
Code: Select all
tell application "Vienna" to get title of article 1 of folder 1
Code: Select all
tell application "Vienna" to get link of current article
Code: Select all
tell application "Vienna" to get url of current folder
The
application object is the only one that can take actions. For example,
Code: Select all
tell application "Vienna" to refresh subscription for folder "Vienna Support"
Good luck!