Announcement

Collapse
No announcement yet.

possible bug? %HSCommand not cleared

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • possible bug? %HSCommand not cleared

    So i've been trying to figure out why when I set %HSCommand inside tasker, the action is actually performed on HS3, but my %HSCommand variable is never cleared. Tracked it into the HS3Post task and added a Flash on %HTTPR, and I see it coming back as 200 (good) and ~should~ be clearing the variable. One thing I noticed is when I added the flash, it started working. I think you need a "Wait until" %HTTPR is actually set from the call to myhs (right before step 31 / Goto Continue). Tasker isn't waiting for the request to come back to execute the next step, and %HTTPR isn't set yet which causes the script to stop where it is without getting to the "Continue" block which clears the value.

  • #2
    Actually, a better solution might be the following (because wait-until might hang if you're in airplane mode - you'll never get a response)...

    FOR loop 1:10
    Wait 500 ms
    Goto End Of Loop (if %HTTPR ~ 200)
    End For
    Goto Action Label "Continue" if %HTTPR ~ 200


    I also noticed you have a "Stop" after that Goto Continue if 200 -- won't that kill your connection for loop and end the task? Basically, if i'm reading this right, you have a for loop that'll try and make 10 attempts to send your request (your intention), but stops after the first try regardless of the response because of that Stop statement inside your for loop.

    Also, if the 10 attempts fail, Clear_Variables isn't being called.

    Comment

    Working...
    X