Forum

Please note that you can subscribe to the individual forums. A subscription for news only covers the news.

Getting the name of a picture taken by the program  

  RSS

tastetest
(@tastetest)
Member
Joined: 2 weeks ago
Posts: 2
03/01/2019 8:53 pm  

So I've been playing around with this program for a bit until I hit a dead end. I noticed, please correct me if I'm wrong, that there was no support for displaying a specific picture that was taken by the program.

So I decided to try and come up with a function. After figuring out how the naming scheme of the pictures taken was working and a bit of trial and error, I managed to come up with a somewhat usable solution.

Right up front, this only works for displaying pictures in statuses. With a bit of luck and a little different version of this program can also work with "ShowPicture". The reason for this is that it uses wildcards.

There is probably quite a few unnecessary conversions and not so clean code, but here it is anyways:

[report-SnapPicture]
set$=$yyReturnProcedure,DisplayPictureName
Procedure=TakePictureWithName

[procedure-DisplayPictureName]
message={$yyPicture}*.jpg

;takes $yyReturnProcedure returns $yyPicture
[procedure-TakePictureWithName]
seconds!=!s,#zzSecond
set!=!r,!s
round!=!r,00:00:10
Case=First
When=!r>!s
subtract!=!r,00:00:10
Case=End
seconds#=#fullSeconds,!r
seconds#=#s,!s
subtract#=#s,#fullSeconds

Case=First
When=#s>6
setFlag=TakePicture3s
add#=#fullSeconds,10
set#=#yyTens,#fullSeconds
divide#=#yyTens,10
When=#s<=6
set#=#yyTens,#fullSeconds
divide#=#yyTens,10
Procedure=snapPicture
Case=End

[flag-TakePicture3s]
Duration=00:00:03
ExpireProcedure=snapPicture

[procedure-snapPicture]
SetFlag=RemoveCameraStatus
newSubStatus=TakePicture

[status-TakePicture]
substatus=1
CameraInterval=00:00:01,00:00:01

[flag-RemoveCameraStatus]
Duration=00:00:01
ExpireProcedure=StopTakingPictures

[procedure-StopTakingPictures]
NewStatus=&LastStatus
set$=$yyPicture,virmst-{#zzYear}0{#zzMonth}0{#zzDay}-{#zzHour}-{#zzMinute}-{#yyTens}
Procedure={$yyReturnProcedure}

ReplyQuote
Topic Tags
Sven B.
(@admin)
Member Admin
Joined: 1 year ago
Posts: 49
08/01/2019 7:58 pm  

Thank you for the code. I don't think there is a easy way to do this. But I have noted a request for a variable to give you the name of the last picture taken. 

Sven B.


ReplyQuote
Share: