Control fixture in programmer

e:cue Forum Foren English Discussion Forums e:script Macro Language (E) Control fixture in programmer

Ansicht von 9 Antwort-Themen
  • Autor
    Beiträge
    • #218969
      raccoonpacific
      Teilnehmer

      Hi there,

      Actucally i want to control fixture instensity through macro, but i’ve got error , syntax error

      here’s the code

      int fix_type, fix_count, i;
      fix_type = GetFixtureTypeId(“RGBFader”);
      if (fix_type < 0) { MessageError(“Fixture Type RGBFader not found in show.”); exit; } fix_count = GetFixtureTypeCount(fix_type); printf(“This many fixtures in show: %d n”, fix_count); for (i=0; i <= fix_count; i++) { proSelectOut(); proSelectSingle(fix_type,i); SetPosition(65535); proLoadValue(0); proLoadValue(1); proLoadValue(2); }

    • #226536

      Hi there,

      Actucally i want to control fixture instensity through macro, but i’ve got error , syntax error

      here’s the code

      int fix_type, fix_count, i;
      fix_type = GetFixtureTypeId(“RGBFader”);
      if (fix_type < 0) { MessageError(“Fixture Type RGBFader not found in show.”); exit; } fix_count = GetFixtureTypeCount(fix_type); printf(“This many fixtures in show: %d n”, fix_count); for (i=0; i <= fix_count; i++) { proSelectOut(); proSelectSingle(fix_type,i); SetPosition(65535); proLoadValue(0); proLoadValue(1); proLoadValue(2); } [/quote] Check Line 3 and 10, maybe post it in a scripteditor like notepad ++, but i think 3 and 10 are missing statement marks

    • #226537
      bkruse
      Teilnehmer

      Hi,

      basically it looks fine, which line number is mentioned with the error?
      The quotes look a bit strange, I can’t see if this is due to pasting into this forum or if it is already in your script?
      Try changing all the “ to ” and ” to ”
      (Simply delete them and type them new.)

      Bests, Björn

    • #226538
      raccoonpacific
      Teilnehmer

      Thanks Björn

      May i know how could i do like Chose fixturre number at a specified level by parameters???

      Thanks

    • #226539
      bkruse
      Teilnehmer

      Hi,

      with getarg() you can get the parameters. Only numbers are supported and up to 5 parameters are possible.

      Here a tiny modification to your script, which should demonstrate how you can use it:

      int channel = getarg(0);

      int fix_type, fix_count, i;
      fix_type = GetFixtureTypeId(“RGBFader”);
      if (fix_type < 0) { MessageError("Fixture Type RGBFader not found in show."); exit; } fix_count = GetFixtureTypeCount(fix_type); printf("This many fixtures in show: %d n", fix_count); for (i=0; i <= fix_count; i++) { proSelectOut(); proSelectSingle(fix_type,i); SetPosition(65535); proLoadValue(channel); } [/ts] Hope that helps, Björn

    • #226540
      raccoonpacific
      Teilnehmer

      Hi,

      Thank a lot for your help…. I tried those CODE but it is little bit different than i thought…

      Actually i have almost 10,000 Lighting Fixture(a mix of DESK channel and RGB, RGBW channel….), instead of write over 20,000 Macro(On/off) which is i am not sure the system support such qty of Macro…. may i know is it possible to do something Like this ..

      – Call a Lighting fixture # “X” at intensity level “Y”, This “X” and “Y” could be input by user….

      Million Thanks

      Hi,

      with getarg() you can get the parameters. Only numbers are supported and up to 5 parameters are possible.

      Here a tiny modification to your script, which should demonstrate how you can use it:

      int channel = getarg(0);

      int fix_type, fix_count, i;
      fix_type = GetFixtureTypeId(“RGBFader”);
      if (fix_type < 0) { MessageError("Fixture Type RGBFader not found in show."); exit; } fix_count = GetFixtureTypeCount(fix_type); printf("This many fixtures in show: %d n", fix_count); for (i=0; i <= fix_count; i++) { proSelectOut(); proSelectSingle(fix_type,i); SetPosition(65535); proLoadValue(channel); } [/ts] Hope that helps, Björn [/quote]

    • #226541
      bkruse
      Teilnehmer

      I understand.

      this one is more generic.
      Example call, it will change fixtures 7 to 11, set channel green (1) to 50%:
      “myMacro, 7, 5, 1, 32768”
      (Assuming that your fixture ids start at 1)

      int fixtureId = getarg(0); // id of first fixture
      int count = getarg(1); // how many fixtures, starting from first fixture
      int channel = getarg(2); // which channel to change
      int value = getarg(3); // which value (0..65535) to set

      int fix_type, i;
      fix_type = GetFixtureTypeId(“RGBFader”);
      if (fix_type < 0) { MessageError("Fixture Type RGBFader not found in show."); exit; } for (i=fixtureId; i

    • #226542
      raccoonpacific
      Teilnehmer

      Thank you so much Björn,

      i Tried this code, when i run this macro , nothing show up or any error …

      may i have your advice for this??

      I understand.

      this one is more generic.
      Example call, it will change fixtures 7 to 11, set channel green (1) to 50%:
      “myMacro, 7, 5, 1, 32768”
      (Assuming that your fixture ids start at 1)

      int fixtureId = getarg(0); // id of first fixture
      int count = getarg(1); // how many fixtures, starting from first fixture
      int channel = getarg(2); // which channel to change
      int value = getarg(3); // which value (0..65535) to set

      int fix_type, i;
      fix_type = GetFixtureTypeId(“RGBFader”);
      if (fix_type < 0) { MessageError("Fixture Type RGBFader not found in show."); exit; } for (i=fixtureId; i

    • #226543
      bkruse
      Teilnehmer

      Hi,

      You need a patch/showfile that contains RGBFader.
      Then you need to call this macro with parameters.

      So wherever choose Action “Call Macro” and insert “myMacro, 7, 5, 1, 32768”
      For testing, I like the shortcut Ctrl+q which executes the configured Action instantly.
      Assuming this macro is named “myMacro” in your showfile…

      Bests, Björn

    • #226544
      raccoonpacific
      Teilnehmer

      THANKS YOU SO MUCH, Björn , I FIGURE IT OUT FINALLY, I NEED TO INPUT IT AT THE END. NOW IT WORKS!!!!

      I MODIFIED IT A BIT FOR DESK CH TOO. AND IT WORK!!!

      MILLION THANKS!!

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