Forum Replies Created

  • James Primhak

    June 30, 2013 at 10:31 pm in reply to: script mask shape to motion path

    Wow, what an answer!

    Cheers man thats amazing

  • James Primhak

    May 9, 2013 at 8:30 am in reply to: AE scripting: using the colorpicker

    Hi Dan,

    Thanks for getting back to me. I get the same result using that code. It works fine apart from the magnifying glass part. Whats strange is that if i dont do any kind of conversion to the colorpicker value at all the decimal value it returns is wrong (when I use the magnifying glass thing). So if I use the code:

    var myDecColor = $.colorPicker();
    alert(“decimal = ” + myDecColor);

    and colorpick an rgb value of (84,84,84), I get 4342338, whereas I believe it should be 5526612. Wierd.

  • James Primhak

    May 8, 2013 at 4:27 pm in reply to: AE scripting: using the colorpicker

    Hi Dan,

    I have realised that the code works OK, but weirdly, it seems to be the system colorpicker that doesn’t work. If I make a test UI panel using the code below, it works fine, unless you use the magnifying glass element of the system colorpicker. If you enter the values manually into the RGB sliders it returns the correct result, but if you try to pick say the grey of the AE interface, it returns RGB values of (84,84,84) (for example), but then the decimal value that is returned is incorrect and so the RGB values my code end up being something like (62,62,62). Also, from that point on ALL colors entered are incorrect, unless I quit AE and start again. Do you get whats going on? Am I missing something really obvious?

    Thanks in advance,

    James

    MY CODE:

    {
    var myPanel;

    function Create_Null(thisObj)
    {
    myPanel = (thisObj instanceof Panel) ? thisObj : new Window(“palette”, “Test Color”, [100, 100, 300, 300]);

    myPanel.butCreate = myPanel.add(“button”, [05, 10, 200, 30], “Test Color” );

    myPanel.butCreate.onClick=TestColor;
    return myPanel;
    }

    function TestColor()
    {
    app.beginUndoGroup(“Test Color”);

    var myDecColor = 0;
    var myDecColor = $.colorPicker();

    var myHexColor = myDecColor.toString(16);

    r = HexToR(myHexColor);
    g = HexToG(myHexColor);
    b = HexToB(myHexColor);

    function HexToR(h) {return parseInt((cutHex(h)).substring(0,2),16)}
    function HexToG(h) {return parseInt((cutHex(h)).substring(2,4),16)}
    function HexToB(h) {return parseInt((cutHex(h)).substring(4,6),16)}
    function cutHex(h) {return (h.charAt(0)==”#”) ? h.substring(1,7):h}

    alert(“decimal = ” + myDecColor + “, hex = ” + myHexColor + “, RGB = ” + r + ‘, ‘ + g + ‘, ‘ + b);

    app.endUndoGroup();
    }

    Create_Null(this);

    }

  • James Primhak

    November 5, 2010 at 2:18 pm in reply to: Scripting – how to copy a mask shape?

    Cheers Dan, that’s awesome. I was on the right track, but I was doing a couple of things wrong. Your post has helped a lot. Thanks again.

    Jim

  • James Primhak

    May 19, 2006 at 1:25 pm in reply to: Video skipping

    Thanks a lot Mike. One more question – is there anything i can do about this to stop them jumping? another program i can use or something? cheers for your time

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy