Set a waiting time between two instructions in a macro script

e:cue Forum Foren English Discussion Forums e:script Macro Language (E) Set a waiting time between two instructions in a macro script

Schlagwörter: , , ,

  • Dieses Thema hat 1 Antwort und 2 Teilnehmer, und wurde zuletzt aktualisiert vor 1 Monat von J Berger.
Ansicht von 1 Antwort-Thema
  • Autor
    Beiträge
    • #247525
      tao xinzhen
      Teilnehmer

      I want to set a waiting time between two instructions in a macro script.
      In other software, it may be “sleep ();” Or “wait(); ”,and so on.
      Similar functions.

      Does anyone know how to implement it in E: script macro?
      Thank you very much

    • #247529
      J Berger
      Teilnehmer

      Hi Tao!
      You can create a cuelist with some (DMX-empty) cues. Set those cues to have Control time of 30sec. Then use the Actions to call your macros. Or one macro with an additional parameter: Time between macro’s steps

      Second idea is using the MessageWaitInfo functions, but this blocks the entire programmer, not shure about LiveFX. I use this macro to restart the HttpServer after wait or sleep time of 5 seconds:

      
      // RestartHttpServer after 5sec
      // run on Reset All and Initialization
      // 1. Show Message with wait Time
      // 2. restart server
      // 3. show result
      // 4. Log Error
      int ret1;
      int ret2;
      ret1 = 8;
      ret2 = 8;
      string infomessage;
      
      MessageWaitInfo("Restart Http Server in 5s",5,0);
      
      // 1=succes; 0=fail
      ret1 = HttpServerRestart();
      
      // 0 -> Disabled; 1 -> Online; 2 -> Unavailable; 
      // 3 -> Starting; // 4 -> Stopping
      ret2 =  HttpServerGetStatus();
      if (ret1 == 1)
      {
      infomessage = format("Restart successful. \n\r restart: %d / server: %d", ret1, ret2);
      MessageWaitInfo(infomessage ,2,0);
      }
      else
      {
      infomessage = format("Restart failed. \n\r restart: %d / server: %d", ret1, ret2);
      MessageWaitError(infomessage ,4,0);
      printf("Macro RestartHttpServer: ");
      printf(infomessage);
      printf("\r\n 0 -> Disabled; 1 -> Online; 2 -> Unavailable; 3 -> Starting; 4 -> Stopping \r\n\r\n");
      }
      

      Greetings, Justus

Ansicht von 1 Antwort-Thema
  • Du musst angemeldet sein, um auf dieses Thema antworten zu können.