franco wrote: ↑Thu Nov 07, 2019 5:38 pm
Can anyone help
I have a folder with a jpg file called A1234.jpg.
This file prints to printer but not to pdf.
The code as follows
How would you do this ?.
Now I still can not print a file created by my programmed camera inside hmg to a pdf.
If I use a image from an outside camera or a picture off the internet it will work, but if I use a picture created in hmg from my lap top camera
I still get the message Can not load image
I think it is something to do with webcam.html. Is there a stand alone webcam.html as everyone is moving away from flash. I can not get flash to work more then one time and it has to ask me if I want to use it.
Any help appreciated.
Franco
I am trying to use the windows camera and it is working with run command.
local cCMD := "start microsoft.windows.camera:"
RUN (cCMD)
I can not save this jpeg file where I want and name what I want. It saves in user ........ folder, which is fine.
Each time before I take a picture I go to folder and rename all the pictures in it, I found a way.
The names of the files are Win_ plus time stamp numbers .jpg
I can rename these with rename "w*.jpg" to "Q*.jpg" and they are all renamed.
Now when I take a picture the only picture in the folder starts with a W and I would like to rename it but I do not know the complete name.
rename W*.jpg to 1234.jpg does not work. I need to know the complete name of the file then it will work.
Does anyone know how to find the complete name of the file starting with W and ending with .jpg, or take away all characters before .jpg.
If it became w.jpg it would be easy to work with like copy file w.jpg to 1234_1.jpg or rename 'w.jpg' to '1234.jpg'.
Thanks in advance
Franco
Hello red2,
I have not used adir before but makes sense. I could bring in after taking picture. If I can sort by date stamp, the
last file will be the last picture. I will try and let you know.
Thanks a lot,
Franco
I have adir working to find file name but now I have another problem.
in visual foxpro I can enter command rename w*.jpg to q*.jpg and any files in folder starting with w and ending with .jpg will be renamed
from the complete w name to the complete q name
file w123.jpg will know be q123.jpg'
I can not do this in hmg rename with a * i just does not work.
could I somehow use adir for this also
Thanks in Advance
Franco
I too come from a VFP background and am learning the differences between it and HMG. I see in the HMG help file that HMG has a command, "RENAME": Syntax: RENAME <cOldFile> TO <cNewFile>
The help file warns: "This command (sic) if not affected by the SET PATH TO or SET DEFAULT TO commands; drive and (sic) directoy designaters must be specified if either file is in a directory other then the default drive and directory."
I have not yet used RENAME in HMG but I suspect that you could, in a loop, rename each file, one at a time, using information from your ADIR array.