Jason Ross [JZway Interactive] wrote:

> I have JPG's on the same CD as my projector file and want to create a
> button(s) that will allow the user to save these JPG's to their HD. Is there
> a way to do this without XTRAS or else, which XTRA do I need?


here's some code which should get you on the right track...

(requires FileXtra - careful with linebreaks in the code):



-- returns full pathName to copied file (or 0 if cancelled)

on copySingleFile whichFile, from_where, defaultTargetDir, prompt
  --> whichFile: the filename
  --> from_where: full path to folder
  --> defaultTargetDir: full path to default target folder
  --> prompt: Text in Dialog Box
  thisPath = getSavePath(defaultTargetDir, whichFile, prompt)
  if thisPath <> "" then
    whichFile = from_where & whichFile
    copyFile(whichFile, thisPath)
    return thisPath
  end if
  return 0
end



on getSavePath defaultFolderPath, thisFilename, dialogPrompt
  if (the platform).char[1]  = "W" then
    thisPathAndFilename = FileSaveAsDialog(defaultFolderPath, thisFilename,
dialogPrompt, TRUE)
  else
    thisPathAndFilename = FileSaveAsDialog(defaultFolderPath, thisFilename,
dialogPrompt)
  end if
  return thisPathAndFilename
end



hth,

Christian

----------------------------
Christian Wach
[EMAIL PROTECTED]
----------------------------



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to