Re: Photo capture

Author: Gene Wirchenko

Posted: 2016-12-07 at 23:34:39

At 15:43 2016-12-07, Sytze de Boer <sytze.kiss@gmail.com> wrote:

>I'm still totally lost trying to capture a photo via AVICAP32, so now

>trying alternatives.

>

>Using the Windows software Camera to take a photo.

>All is good. It places the photo into a folder

>C:\Users\Sytze\Pictures\Camera Roll

>

>cdirs=FILETOSTR('picloc.txt')

What is the format of the file?

1) Does the file have an EOL? That would be copied to cdirs.

2) Does the file end with a backslash? If not, you could get something like

C:\PICLOC1\PICLOC2*.jpg

assigned to ldirs instead of

C:\PICLOC1\PICLOC2\*.jpg

(Note the backslash, the THIRD backslash.)

>ldirs=cdirs+"*.jpg"

>lPics=ADIR(picfiles,ldirs)

>

>trcask350 =cdirs+picfiles(1,1) &&Yes, it now knows the picture

>trcask351 =Sys(5)+Curdir()+"PICS\"+Alltrim(Str(matties.code))+"_PHOTO.JPG"

>**all is good at this stage

3) Does the pics subdirectory exist?

>COPY FILE (trcask350) TO (trcask351)

>

>Here's the problem

>The file in the 2nd location is a zero byte file

>

>Can anyone suggest why this is so?

It previously got written that way and subsequent runs have

done nothing to it? Try deleting it, and see what happens. I got

errors from your code, not a zero byte file until I corrected the three issues.

Sincerely,

Gene Wirchenko

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/5f2ae3aa8fc0c16d69ba043119d7143f@mtlp000085

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2016 Gene Wirchenko