Set pubList to every publication item whose keywords contains "review" Of course, you could also use a repeat statement instead: tell application "Bookends" Set rating of (every publication item whose keywords contains "review") to 4 For instance, this command batch-updates the rating of all publications whose keywords field contains the string "review": tell application "Bookends" In most cases, you'll need to specify a whose clause to only update objects that match a certain condition. You can also edit multiple objects at once. Set title of aPub to "My great new paper" For instance, this would update the title of the most recently added publication in your frontmost Bookends library: tell application "Bookends" You can set new values for any writable object property. As an example, the following command assigns a list with 4 items – two integer numbers, some text and a decimal ("real") number – to a variable named "myList": set myList to įor more info on groups, see Working with groups below. Lists are indicated with braces, and values in a list are separated by commas. In AppleScript, a list is an ordered collection of values of any class. The command's target appears immediately next to the command and is also called the "direct parameter" of the command. The get command has itself a target (in this case, library windows) which is the object that responds to the command. In the above examples, we use the get command to fetch a list of all library windows that are currently open in Bookends. If you have only one command, you can also include the tell statement on the same line: tell application "Bookends" to get library windows A tell statement specifies a default target for all commands contained within it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |