Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: Use some iView Media Pro data in Spotlight' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Use some iView Media Pro data in Spotlight
Authored by: thomas_witt on May 17, '05 04:54:26PM
That's the problem, only certain fields will be indexed. But Location data e.g. won't be indexed, as many more. That's why I use this script. I just updated it a bit, so it will not only change the title but also add the missing data in the spotlight comments field. Again, it's easily customizable:

tell application "iView MediaPro" 
    set tmp to display dialog "Now replacing all titles. Existing data in these fields will be lost. This can take quite a long time. Are you SURE to continue?" buttons {"Cancel", "OK"} default button 1 
    if (the button returned of tmp is equal to "OK") then 
        set mySelection to the selection of catalog 1 
        tell windows 
            set view to media view 
        end tell 
        set oldDelimiters to AppleScript's text item delimiters 
        set AppleScript's text item delimiters to ", " 
        repeat with myItem in mySelection 
            select myItem 
            if (the caption of myItem is not equal to "") then 
                set myCaption to the caption of myItem & " / " 
            else 
                set myCaption to "" 
            end if 

            if (the event of myItem is not equal to "") then 
                set myEvent to the event of myItem & " / " 
            else 
                set myEvent to "" 
            end if 

            if (the location of myItem is not equal to "") then 
                set myLocation to the location of myItem & " / " 
            else 
                set myLocation to "" 
            end if 

            if (the people of myItem is not equal to "") then 
                set myPeople to (the people of myItem as string) 
            else 
                set myPeople to "" 
            end if 

            set myAnnotations to the annotations of myItem 
            set fileComment to myCaption & myEvent & myLocation & myPeople 
            set the title of myItem to fileComment 
            set myPath to the path of myItem 
            export annotations myItem 
            tell application "Finder" 
                set comment of document file myPath to fileComment 
            end tell 
        end repeat 
        set AppleScript's text item delimiters to oldDelimiters 
        tell windows 
            set view to thumbnail view 
        end tell 
        display dialog "Finished metadata update successfully." buttons {"OK"} default button 1 
    else 
        display dialog "Metadata update cancelled!." buttons {"OK"} default button 1 
    end if 
end tell 


[ Reply to This | # ]