AppleScript to "make new image item"

13 views
Skip to first unread message

mistersquid

unread,
Jan 16, 2010, 1:41:45 PM1/16/10
to Yojimbo Talk
Does anyone have any pointers on how to use AppleScript to create a
new image item in Yojimbo?

Using Applescript to make a new note item in Yojimbo is fairly easy
with something like

set itemContents to the clipboard contents
tell application "Yojimbo"
set newItem to make new note item ¬
with contents itemContents
end tell

Replacing the third line in the above code with

set newItem to make new image item ¬

yields

error "Yojimbo got an error: AppleEvent handler failed." number
-10000

I’m stumped and looking for some pointers.

Jim Correia

unread,
Jan 16, 2010, 1:46:42 PM1/16/10
to yojimb...@googlegroups.com
On Jan 16, 2010, at 1:41 PM, mistersquid wrote:

> Does anyone have any pointers on how to use AppleScript to create a
> new image item in Yojimbo?

What is the source of the image?

For images on disk, you can use the import verb:

tell application "Yojimbo"
set f to choose file
set imageItem to import f
set comments of imageItem to "Hello World"
end tell

- Jim

Reply all
Reply to author
Forward
0 new messages