Macro Questions

  • Hello, I'm trying my first macros and I have a question. I would like to create a macro to be able to manually enter the phase value for the dimmer, for example.

    My textline looks like this:

    Attributes "Dimmer" At Phase Var $ = (number 1) thru Var $ = (number 2)

    I can also enter the numbers but nothing is taken over.

    Where do I have the mistake?

    Hallo, ich versuche mich gerade an meinen ersten Macros und habe da eine Frage.

    Ich möchte ein Macro erstellen um den Phasewert beim Dimmer zum Beispiel manuell eingeben zu können.

    Meine Textline sieht so aus :

    Attribute "Dimmer" At Phase Var$ = (Nummer1) thru Var$ = (Nummer 2)

    Ich kann die Nummern auch eingeben aber es wird nix übernommen. Wo hab ich da den Denkfehler?

  • Several issues here:

    • Unless you need to keep these numbers for later, you don't actually have to define a variable.
      • Attribute "Dimmer" At Phase (Nummer 1) Thru (Nummer 2)
        • It's usually a good idea to have the text inside the parentheses give a hint as to what you're supposed to input there:
          ...At Phase (phase range start value) Thru (phase range end value)
        • You can also do this in one popup if you want:
          Attribute "Dimmer" At Phase (phase range)
          and then in the popup input, for example: 0 Thru 360
    • Even if you do want to keep these numbers for later and thus want to use variables, the setting of those variables must be done in a separate command like so:
      • SetGlobalVar phasefrom (phase range start value)
      • SetGlobalVar phaseto (phase range end value)
        • Could also do SetUserVar for both of these if you wanted different users to potentially use the same variable name with different values
      • Attribute "Dimmer" At Phase $phasefrom Thru $phaseto