Madrix question: Sleeps to santa macro

Discussion in 'Sequencers & Software Tools' started by Klanook, Sep 27, 2014.

  1. Klanook

    Klanook New Elf

    Joined:
    Jan 31, 2012
    Messages:
    26
    Likes Received:
    0
    Find Me On:
    Does anyone have a macro or script for madrix to do a sleeps till santa countdown?
    Cheers
     
  2. Ɠαяєтн

    Ɠαяєтн Mae gen i C.L.A.P ei heintus iawn

    Joined:
    Dec 27, 2010
    Messages:
    160
    Likes Received:
    0
    Location:
    Landsdale, Perth, Western Australia
    What version of Madrix are you using?
     
  3. OP
    OP
    Klanook

    Klanook New Elf

    Joined:
    Jan 31, 2012
    Messages:
    26
    Likes Received:
    0
    Find Me On:
  4. Ɠαяєтн

    Ɠαяєтн Mae gen i C.L.A.P ei heintus iawn

    Joined:
    Dec 27, 2010
    Messages:
    160
    Likes Received:
    0
    Location:
    Landsdale, Perth, Western Australia
    Copy and paste the script below into the Macro Editor of the effect SCE Ticker, select script from the menu and compile or pressF5. Monitor the Preview Windows to see the result.




    @scriptname="local ";
    @author="gea";
    @version="MADRIX 2.14";
    @description="Set Sleeps till Christmas in SCE_Ticker text";

    void InitEffect()
    {}

    void PreRenderEffect()
    {
    date DateNow = GetDate();
    date DateTarget = {25,12,2014};
    int MonthDay[] = {31,28,31,30,31,30,31,31,30,31,30,31};
    int inc, count;
    int dnm = (int)DateNow.month;
    int dtm = (int)DateTarget.month;
    int dnd = (int)DateNow.day;
    int dtd = (int)DateTarget.day;


    inc = 0;

    count = dnm;
    while (count < dtm)
    {
    inc += MonthDay[count-1];
    count++;
    }


    inc += dtd;
    inc -= dnd;


    SetText(((string)inc)+" Sleeps to Santa");




    }

    void PostRenderEffect()
    {}

    void MatrixSizeChanged()
    {
    InitEffect();
    }
     

Share This Page