The logic is the same as another. Here is my script for Advan android (the path name is rather different from HP):
Code: Select all
PROC PHOTO_1
onfocus
string NamePhoto = pathname(application) +
maketext("Internal St/csentry/2018/2018_P/RESOURCES/PHOTO_E/PHOTO_E_%04d_1.jpg", ID_RESP);
if fileexist(NamePhoto) then
setvalueset($, PHOTO_1_VS2);
else
setvalueset($, PHOTO_1_VS1);
endif;
postproc
if $ = 1 then
//take/ retake photo
execsystem(maketext("camera: %s", NamePhoto));
reenter;
elseif $ = 2 then
//view foto
execsystem(maketext("view: %s", NamePhoto));
reenter;
elseif $ = 3 then
//Save photo
elseif $ = 9 then
//Refused
if fileexist(NamePhoto) then
filedelete(NamePhoto);
endif;
endif;
Code: Select all
PROC PHOTO_2
onfocus
string NamePhoto = pathname(application) +
maketext("My Storage/csentry/2018/2018_P/RESOURCES/PHOTO_E/PHOTO_E_%04d_2.jpg", ID_RESP);
if fileexist(NamePhoto) then
setvalueset($, PHOTO_2_VS2);
else
setvalueset($, PHOTO_2_VS1);
endif;
postproc
if $ = 1 then
//take/ retake photo
execsystem(maketext("camera: %s", NamePhoto));
reenter;
elseif $ = 2 then
//view foto
execsystem(maketext("view: %s", NamePhoto));
reenter;
elseif $ = 3 then
//Save photo
elseif $ = 9 then
//Refused
if fileexist(NamePhoto) then
filedelete(NamePhoto);
endif;
endif;
Idk what wrong is. It's okay when I used it (the script) for Samsung smartphone/tablet.
Kindly please help me.
Thank you before and after.
Regards,
lusia