Forum

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

Is there a way to extract the current minduration from the job parameter list  

  RSS

0

I would like to extract the MinTime=1899-12-30 00:01:00
for a task that can have the duration accumulate until the task is performed.  In this case that would be 1 minute.

I would like to use this value to set a flag duration after the sub does the necessary preparation for the task and answers yes to a question about being ready to perform the task.

 

Is there a way to obtain the min duration from the task definition?

 

Thanks for any help.

 

 
0

I'm sorry, there's no way to do that.

Sven B.

 
0

After replying from memory, I looked in the manual. There is the variable !zzMinTime. Maybe you can use that. You will need to use it at a time where it is available, and that may be a challenge in your situation. 

Sven

Thank you Sven.   When !zzMinTime returns a value does it return as 00:02:30  or as the number of seconds  like 150 seconds?

I have a punishment that can accumulate time until it is run.  When I select the punishment to run I have a number of procedures to  select items needed.  Then a question to be sure sub is ready  to start which then ideally would call !zzMinTme to set the duration of the flag.  My test so far failed resulting the flag to expire after only 1 second.

 

0

!zzMinTime returns a time value, which can be used directly in the Duration keyword in the flag. The catch is, that !zzMinTime is only useful when used in connection with an assignment. That could be in a BeforeProcedure for the punishment. The one second is probably because you used !zzMinTime out of scope. 

I don't know what you will use the flag for. But you may be able to accomplish the same by using a MinTimeProcedure. Or have the MinTimeProcedure remove the flag. 

Sven B.

 

 

Thank you Sven!!!

I have been able to do what I want to do.   The key is to save the !zzMinTime to a time variable:

set!=!FlagTime,!zzMinTime

in the first line of the StartProcedure in the Punishment.

 

Here is the Punishment with procedures, flag,  and question:

 

[punishment-Wear a gag for # minutes]
value=25
Accumulative=1
ValueUnit=minute
LongRunning=1
max=20
Text=You must wear a gag
startProcedure=PunishSelectAGag

[procedure-PunishSelectAGag]
; Get the current MinTime value for the Punishment
set!=!FlagTime,!zzMinTime

;select which penis gag to be worn
random#=#GagFactor,2

case=first
when=#GagFactor=1
set$=$GagText, You will wear the black penis gag
when=#GagFactor=2
set$=$GagText, You will wear the pink penis gag
case=end
message={$GagText}
ClothReport=Report wearing {$GagText}
Question=PunishGagReady

 

[Question-PunishGagReady]
Phrase=Is your gag on?
?Yes=PunishPenisGagIsIn

 

[procedure-PunishPenisGagIsIn]
setflag=PunishPenisGag
set#=#pGagStart,#zzSecondsPassed

[flag-PunishPenisGag]
text=Keep the penis gag on until you are allowed to take it off
;Set Flag duration to the MinTime of the punishment
Duration=!FlagTime
ExpireProcedure=PunishRemovePenisGag

[Procedure-PunishRemovePenisGag]
set#=#pGagEnd,#zzSecondsPassed
sound=chimes.wav

;Determine number of merits to be granted in the report procedure(s)
set#=#seconds,#pGagEnd
subtract#=#seconds,#pGagStart

message=You can remove the gag now.
message=Penis gag worn {!zzduration}
ClothReport=Remove {$GagText}
message=Report penis gag worn via reports

 

Share: