Hi Tim,
To adapt your code example to our own application, the script command we are looking to check in our existing program is :
PUTHTTP ām2u.talk2m.comā,"/post_ewon.php",z$,"","POSTERROR"
In the event that this command returns a fault, I assume that the string āPOSTERRORā would be returned somehow? If so, what line(s) of code would make this an actionable trigger? Iām guessing that Iād need to do something like this:
e% = GETSYS Prg,"EVTINFO"
in order to acquire the āwas it faultedā flag???
If thatās correctā¦
Could I use e% = āPOSTERRORā to trigger a fault event?
What would e% be in the case of no fault? A null string?
If so, I then assume that:
IF e% = POSTERROR" THEN
TSET 1,120
ONTIMER 1,"@Retry()"
ENDIF
ā¦would be a way to activate a timer to define a timer and resend the failed command after 120 seconds? ā¦or do I not want to keep doing TSET commands for each new instance of an error?
If this is all good, then I assume that weād need to do the test backwards and disable the timer if there was NO error. Soā¦ something like this?
Function Retry()
PUTHTTP ām2u.talk2m.comā,"/post_ewon.php",z$,"","POSTERROR"
e% = GETSYS Prg,"EVTINFO"
IF e% <> POSTERROR" THEN
(How do you turn off a timer??)
EndIf
EndFn
Let me know if Iām in the neighborhood or out in the suburbs.
Thanks!