Applescript examples

An RSS/Atom newsreader with features comparable to commercial newsreaders.
Post Reply
Savanna
Harmless
Posts: 3
Joined: Tue Nov 22, 2022 9:20 am

Applescript examples

Post by Savanna »

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

Re: Applescript examples

Post by Savanna »

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

Re: Applescript examples

Post by pukku »

- 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

Re: Applescript examples

Post by Savanna »

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

Re: Applescript examples

Post by philmur »

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!
Post Reply