William,

I keep as part of one of my libraries a function:

fixExt()

on mouseUp
  ask file "Save As:" with filter "TXT,*.txt"
  if it is not empty then
      put it into tfile
      put fixExt(tfile,"txt") into tfile
      SaveFile #do save stuff here
  end if
end mouseUp

function fixExt pFilePath,pExtension
  local tFileName
  set itemDel to "/"
  put last item of pFilePath into tFileName
  delete last item of pFilePath
  set itemDel to "."
  if the last item of tFileName <> pExtension then
put pExtension into item (the number of items of tFileName+1) of tFileName
  end if
  return pFilePath & "/" & tFileName
end libFileManagement_FixExtension

William de Smet wrote:

How can I force a true .TXT extension (even when deleting the suggested name)?

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to