How to export the images of a stack
    Reinhold Venzl-Schubert 
    R.Venzl-Schubert at t-online.de
       
    Thu Aug 18 15:39:51 CDT 2005
    
    
  
Hello Dave,
> Looking back at an earlier mail, I see the possible problem. You say
> the imagePath variable contains a list of files like this:
>
> Media/StrainUndef.jpg
> Media/StrainTriaxOblat1.jpg
> Media/StraintriaxOblat2.jpg
> Media/DeformStrain.jpg
> Media/DeformTrans.jpg
> Media/DeformRotat.jpg
>
> I assume the current defaultFolder is the folder where the "Media"
> folder is contained. Your script deletes the folder name to get the
> filename. But then the path to the original file is wrong.
Yes, this was my error!
> This should be better:
>
>    set the itemDel to "/"
>    repeat with i = 1 to num of lines in ImagePath
>      put line i of ImagePath into ImagePathName
>      put item -1 of ImagePathName into ImageFileName
>      if there is a file ImagePathName then
>         put url ("binfile:" & ImagePathName) into url
> ("binfile:Export/" & ImageFileName)
>      else
>          answer "No such file." & return & ImagePathName
>      end if
>    end repeat
Now it works perfect :-)
Thanks
Reinhold
    
    
More information about the metacard
mailing list