• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Getting label from a record
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting label from a record


  • Subject: Getting label from a record
  • From: EBI Aktivitet <email@hidden>
  • Date: Mon, 17 Nov 2003 10:56:48 +0100

I'm trying to get a list of all the labels in a record. That is, not their
values, but the actual label name.

I have a record of all the properties of a document, and want to extract the
(unknown) labels to a list. I've tried a number of syntaxes, but nothing
seems to work right...

--This works fine--

tell application "Adobe Photoshop CS"
set theProperties to (properties of document 1)
end tell

GetProperties(theProperties)

on GetProperties(theProperties)
try
repeat with i in ((theProperties as record) as list)
-->as record seems necessary for calls from the error handler
try

display dialog (class of i) as text
-->Result is class, like integer, Unicode text etc.
display dialog (i) as text
-->Result is the value of i, like 5 or "Some text" etc.

on error
tell me to GetProperties(i)
--This error call to the handler is to force it to
--walk list items of the record
end try
end repeat
on error errmsg
display dialog errmsg
end try
end GetProperties

--End of works fine--

Now, I'd like to do something like

display dialog (label of i) as text

But I just cant get it right...


Regards, Adim Lundin
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Getting label from a record
      • From: Emmanuel <email@hidden>
    • Re: Getting label from a record
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: Full Integer o real.
  • Next by Date: (beep) as string
  • Previous by thread: Re: Full Integer o real.
  • Next by thread: Re: Getting label from a record
  • Index(es):
    • Date
    • Thread