Problems getting Object type from item ref

Cheers!

In my script I get this value (item ref) for the variable TheFrame:
text frame id 4127 of spread id 919 of document id 10

And I want to know what kind of object it is (I know it is a text frame, but for my script :wink:

I have tried this:

set KindOfFrame to the object type of TheFrame

But get the error that it can’t get the object style… what am I doing wrong?

You can get the type of any object with the class keyword, but the class of a text frame is text frame

YES! I got “txtf” but that’s good! :lol:

Edit: Value is text frame! You were right - of course! : )
Got txtf when using “display dialog…”

Big thanks Stefan!