Saturday, December 16, 2017

#1 2002-02-22 10:35:17 am

T.J. Mahaffey
Administrator
From:: Arkansas, USA
Registered: 2002-11-20
Posts: 238
Website

Ok, small glitch here (Canto Cumulus, etc.)

Ok, here we are now. The stuff I've posted lately, including this one, is actually part of a larger total-automation process. If somebody can give me a clue on this ONE error I'm getting, I'll be glad to take'm out to a steak dinner the next time they're in town.
Although I'm scripting Canto Cumulus here, I'm certain that the "Variable recID is not defined" error I'm getting is bound to ring a bell to any seasoned scripter out there.
Ok, so why is it not defining the recID variable? I know that Cumulus is looking for an alias reference when picking up images to catalog, but I don't seem to be passing it the correct data type, correct? But I've tried coercing the itemList to other types, but to no avail.

Applescript:

tell application "Finder"
   if disk "HFS Volume" exists then      
       put away disk "HFS Volume"       
       MountIP "afp://images.mydomain.com/Database_Assets/" without login message  
   end if   
   if disk "Database_Assets" exists then      
       set cosmeticsFolder to folder "000_Cosmetics" of disk "Database_Assets"   
       set itemList to every item in cosmeticsFolder whose label index is 6    
           repeat with aktItem in itemList     
                set itemComment to comment of aktItem    
             tell application "Cumulus 5 Client"     
                   activate          
               set recID to (catalog assets (aktItem as alias) to front collection)                                       
-- * here's where it errors out.                          
               tell recID          
                   set value of field "Notes" to (itemComment as text)        
               end tell
           end tell    
                  set label index of aktItem to 2     
          end repeat
   end if   
   say "Image catulogging is complete." using "Victoria"
end tell

Many, many thanks in advance.


T.J.
tj@tjmahaffey.com


Filed under: Finder, Cumulus

Offline

 

#2 2002-02-22 11:56:45 am

T.J. Mahaffey
Administrator
From:: Arkansas, USA
Registered: 2002-11-20
Posts: 238
Website

Re: Ok, small glitch here (Canto Cumulus, etc.)

FIGURED IT OUT!
Sometimes ONE FRICKIN' word means the difference between success and failure.
For any of you who may have wanted to know, here's the problem.
When declaring the itemList based on "items" whose labels were X, that's the problem. It needed to be FILES whose labels were X.
Because Cumulus needs FILES, not ITEMS to catalog. Changed that statement to FILES and it runs like a scalded dog.
Be well. I'm going to have a fantastic weekend NOW. <grin>


T.J.
tj@tjmahaffey.com

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)