help with binfile

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
CenturyMan1979
Posts: 86
Joined: Tue May 15, 2012 5:56 pm

help with binfile

Post by CenturyMan1979 » Wed Aug 22, 2012 7:07 pm

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

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: help with binfile

Post by mwieder » Wed Aug 22, 2012 8:15 pm

Try it without the slash:

Code: Select all

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

CenturyMan1979
Posts: 86
Joined: Tue May 15, 2012 5:56 pm

Re: help with binfile

Post by CenturyMan1979 » Thu Aug 23, 2012 3:26 pm

That did it. Thanks for the help.

Post Reply