Problem saving image for file

Mike Bonner bonnmike at gmail.com
Sat Jul 28 23:52:07 CEST 2018


If you use the path /tempMedia.... that forces it to the root of the
filesystem and if there isn't a folder /tempmedia, it'll fail.  Either
leave off the preceding slash, or prepend it with a . <--(a dot) which
designates the current directory.

On Sat, Jul 28, 2018 at 3:40 PM Peter Bogdanoff via use-livecode <
use-livecode at lists.runrev.com> wrote:

> That is (or use variables for the filename):
> > export image "testimage.jpg"  to file "/tempMedia/testimage.jpg" as JPEG
>
>
>
>
> > On Jul 28, 2018, at 2:37 PM, Peter Bogdanoff via use-livecode <
> use-livecode at lists.runrev.com> wrote:
> >
> > Hi,
> >
> > Try using this syntax:
> > export image "tImage"  to file "/tempMedia/testimage.jpg" as JPEG
> >
> > I think you need binfile to read but not to write.
> > Peter
> >
> >
> >> On Jul 28, 2018, at 1:41 PM, Stephen MacLean via use-livecode <
> use-livecode at lists.runrev.com> wrote:
> >>
> >> Hi All,
> >>
> >> Been a long time since I’ve done file work with LC, but I’m having an
> issue saving an image to a file:
> >>
> >> # set the defaultFolder to the folder containing the stackfile
> >>
> >> set the itemDelimiter to slash
> >>
> >> get the effective filename of this stack
> >>
> >> set the defaultFolder to item 1 to -2 of it
> >>
> >> put tTempCrop into URL "binfile:/tempMedia/testimage.jpg"
> >>
> >>
> >> results in a “Can’t open file” error.
> >>
> >> Trying to save to a folder called “tempMedia” that is in the same
> directory as the stack.
> >>
> >> Mac OS 10.12.6, 9.01 RC1 Business.
> >>
> >> TIA,
> >>
> >> Steve MacLean
> >> _______________________________________________
> >> use-livecode mailing list
> >> use-livecode at lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


More information about the use-livecode mailing list