2

I'm adding AppleScript support to my macOS application but I have problems accessing a property of an object I defined.

The sdef file resulted in the following directory:

sdef activities

When I run the following script:

tell application "Daily"
    get all activities
end tell

I get this result:

get all activities output

However, when I run this script:

tell application "Daily"
    repeat with iActivity in (get all activities)
        name of iActivity
    end repeat
end tell

I get this error:

error "Daily got an error: Can’t make «class » id \"E10E6A7B-6D3B-464B-9C31-35DB6763C492\" into type specifier." number -1700 from «class » id "E10E6A7B-6D3B-464B-9C31-35DB6763C492" to specifier

Any idea what I am doing wrong? Thanks!

Niels Mouthaan
  • 1,010
  • 8
  • 19
  • In your application "Daily", what class is it "meant" to return? eg. (NSString, etc...) – YeaTheMans Nov 12 '16 at 01:06
  • Don't put command "get all activities" in the dictionary. Applescript can do this. – Willeke Nov 12 '16 at 14:09
  • Thanks Willeke. However, "get all activities" will be replaced into something like "get all activities between and ". These dates are not part of the model and I assume filtering will be hard because of this. – Niels Mouthaan Nov 15 '16 at 21:25

0 Answers0