Page 1 of 1

help with binfile

Posted: Wed Aug 22, 2012 7:07 pm
by CenturyMan1979
Hey all,

I am trying to ouput some file data with binfile but can't seem to get it to work. Not sure if it has to do with the file being a font or not but any help would be great.

Code: Select all

function outputFontTest
   
   local tFontFile, tFont
   
   put specialFolderPath("Fonts") &  "/helr45w_0.ttf" into tFontFile
   
   if there is a file tFontFile then
      put URL("binfile:/" & tFontFile) into tFont
   else
      return "Font file does not exist"
   end if
   
   if tFont is empty then
      return "No font data to save out"
   else
      put tFont into URL ("binfile:/" & specialFolderPath("Desktop") & "/helr45w_0.ttf")
   end if
   
end outputFontTest

Re: help with binfile

Posted: Wed Aug 22, 2012 8:15 pm
by mwieder
Try it without the slash:

Code: Select all

put URL("binfile:" & tFontFile) into tFont

Re: help with binfile

Posted: Thu Aug 23, 2012 3:26 pm
by CenturyMan1979
That did it. Thanks for the help.