Applescript problem
I have an Applescript that deletes the last line from the captions of the selected images. It always ran - and still does - perfectly under EM2.
This line in the script:
if (exists catalog 1) then set selectedID to the selection of catalog 1
produces an error:
"Media Pro returned an error: selection of catalog 1 cannot be retrieved. " number -1728 from selection of catalog 1
NB The error text is translated from Dutch (the language of my OS). I'm running Snow Leopard. The very same script runs fine on Expression Media 2, on the same machine. Of course I changed the name of the app in the script.
The syntaxes of MP and EM2 look identical to me.
Anyone who knows how to solve this?
This line in the script:
if (exists catalog 1) then set selectedID to the selection of catalog 1
produces an error:
"Media Pro returned an error: selection of catalog 1 cannot be retrieved. " number -1728 from selection of catalog 1
NB The error text is translated from Dutch (the language of my OS). I'm running Snow Leopard. The very same script runs fine on Expression Media 2, on the same machine. Of course I changed the name of the app in the script.
The syntaxes of MP and EM2 look identical to me.
Anyone who knows how to solve this?
0
-
Hi,
Running the following on my Mac Pro (10.6.8) I get no error:tell application "Media Pro"
if (exists catalog 1) then set selectedID to the selection of catalog 1
end tell
So, can't reproduce it here, on this Mac.
Is there some other parent tell block for a different app that your MP tell block is nested in? Can you share more context of your script?
Try the script text above in a separate, new test script and see if you get the same error. Also, try the code on a fresh catalog with some newly added media items.
Error –1728 means "Can’t get <reference>" which I interpret as a possible tell block misinterpretation of "the selection" by a parent tell block's app (i.e. you think it is for MP's selection but a parent tell block of, say, Finder sees it as its selection). If this is the case, keep your tell blocks separate instead of nested, which cause more problems under SnoLeo.
Refs:
MacScripter/Mac Error Codes
MacScripter/AppleScript and AppleScript Studio in Snow Leopard
Edit:
This is what I get when running the error lookup script posted on "MacScripter/Mac Error Codes" url above:
http://dl.dropbox.com/u/6317362/mp/AS-Error_-1728_8b.png
Larry0
投稿コメントは受け付けていません。
コメント
1件のコメント