• 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
ColorsyncScripting Match command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ColorsyncScripting Match command


  • Subject: ColorsyncScripting Match command
  • From: "Fleisher, Ken" <email@hidden>
  • Date: Tue, 04 Dec 2007 12:31:07 -0500
  • Thread-topic: ColorsyncScripting Match command

Title: ColorsyncScripting Match command
Hello. I’m having trouble getting the match command in ColorSyncScripting to work. I keep getting an error of type –176 which occurs on the line with the match command. My script is below. Does anyone see any reason that it should not work? Thanks in advance.

on run
   set somefile to choose file with prompt "Choose an image"
    open somefile
end run

on open draggeditems
   try
       set startTime to current date
       tell application "ColorSyncScripting"
            launch
           set quit delay to 5
        end tell
       
        set sourcefiles to filelistFromSelection(draggeditems)
        repeat with thisFile in sourcefiles
           set thisFile to thisFile as alias
           
            tell application "ColorSyncScripting"
                embed thisFile with source alias "
Mac HD:Users:k-fleisher:Library:ColorSync:Profiles:AdobeRGB1998_D65_2_D57.icc"
                match thisFile to destination profile "Adobe RGB (1998)" matching with absolute colorimetric intent
           end tell
       end repeat
       
        set endTime to current date
       display dialog ((endTime - startTime) as string) & " seconds to complete."
    on error errmsg
       activate
       display dialog errmsg
   end try
end
open


--returns dragged files OR files at first level of one dragged folder
on filelistFromSelection(theselection)
    set hasfolder to false
   tell application "Finder"
        repeat with thisItem in (theselection as list)
            if (class of item thisItem is folder) or (class of item thisItem is disk) then
               set hasfolder to true
           end if
       end repeat
   end tell
   if ((count item of (theselection as list)) > 1) and hasfolder then
       display dialog "Drag multiple files or a single folder." buttons {"OK"} default button 1
        return ""
    end if
   tell application "Finder"
        if hasfolder then
           set filelist to (every item of folder (item 1 of (theselection as list))) as alias list
       else
           set filelist to (theselection as list)
        end if
   end tell
   return filelist
end filelistFromSelection

--
Ken Fleisher

Photographer
Imaging & Visual Services
National Gallery of Art
Washington, D.C.

Phone: (202) 712-7471
email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: Problem with reading 4-byte floats from file on Intel
  • Next by Date: Re: RGB Color Space In InDesign
  • Previous by thread: ColorSyncScripting errors
  • Next by thread: FileMaker and AppleScript
  • Index(es):
    • Date
    • Thread