• 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
Re: cumulus, finding parent category
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cumulus, finding parent category


  • Subject: Re: cumulus, finding parent category
  • From: Bryan <email@hidden>
  • Date: Fri, 05 Jan 2001 12:55:29 -0500
  • Organization: Apex Radiology

Cumulus is distributed with a script called 'Show Category Folder' which returns
the
MacOS Directory of the frontmost cateaog. HTH
---------------------
(*
Look for folders of the selected categories in the category list of the frontmost
catalog. The error message is displayed when the categories are not Macintosh
direcotry category.
)1999 Canto Software
*)
----------------------
-- buttons
property sCancel : "Cancel"
property sQuit : "Quit"
-- messages
property sPleaseOpenACatalog : "Please open a catalog and try again."
property sPleaseSelectOneOrMoreRecords : "Please select one or more categories."
property sDirecoryCategory : "This category is not a Mac OS directory category.
Please select Mac OS directory category."

tell application "Cumulus 5 Client"
if (count every collection) = 0 then
display dialog sPleaseOpenACatalog buttons sQuit default button 1
return
end if
tell front collection
if (count every category) = 0 then return
if (count every category of selection of front window) = 0 then
display dialog sPleaseSelectOneOrMoreRecords buttons sQuit default button 1
return
else
set categoryList to ID of every category of selection of front window as list
repeat with i in categoryList
set categoryType to (get value of field "Category Type" of category id i)
if categoryType = 8 then
set folderID to (get value of field "Macintosh Directory ID" of category id
i)
set diskDate to (get value of field "Macintosh Volume ID" of category id i as
date)
else
display dialog sDirecoryCategory buttons sQuit default button 1
return
end if
tell application "Finder"
activate
set diskID to (get id of every disk where creation date is diskDate)

try
set dstFolder to folder id folderID of disk id diskID
open container of dstFolder
on error errStr number errNo
if errNo = 32768029 then
set dstFolder to desktop
end if
end try

select folder id folderID of disk id diskID
end tell
end repeat
end if
end tell
end tell
----------------------

"Hevard, Inkognito" wrote:

> How do I get the parent (or grandparent) categorys of a given
> category in Cumulus 4?
>
> if I select one database item and run:
>
> tell application "Canto Cumulus Client"
> set currentItem to id of every row of selection of catalog window of database 1
> set currentCategories to categories of (row id currentItem of database 1)
> end tell
>
> currentCategories:
> --> list of categories ie {"ford", "jan/1999"}
>
> how do I change it to return something like:
> {"hardware:cars:uscars:ford", "ads:newspaper:times:jan/1999"}
>
> I would need to detect that "jan/1999" is a child of "times".
>
> any suggestions?
>
> Havard
> _______________________________________________
> applescript-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/applescript-users


References: 
 >cumulus, finding parent category (From: "Håvard, Inkognito" <email@hidden>)

  • Prev by Date: Re: Chevrons [getting OT] - and back on topic again
  • Next by Date: Re: if, idle, stay open (again, sorry)
  • Previous by thread: cumulus, finding parent category
  • Next by thread: Photoscripter support
  • Index(es):
    • Date
    • Thread