After Effects: controlling slider in ExtendScript I'm newbie in After Effects. I've learned how to control slider from expressions. Now I need to get value of slider in script (jsx/extendscript). How can I achieve that?

I've tried (in *.jsx): var a = comp.layer("Slider 1").effect("Slider Control")("Slider")[0];

Result: 


  After Effects error: Unable to call "setValue" because of parameter 1.
  Value "NaN" of element 0 in the array is not a valid float.


It means that value of slider is not set yet?

Thanks

EDIT:

Here is a example:

var slider = comp.layers.addNull();
slider.name = "Slider";
slider.effect.addProperty("ADBE Slider Control")("Slider");
slider.effect("Slider Control").property("Slider").setValue(100);

var a = slider.effect("Slider Control").property("Slider");
var titleTriangle = comp.layers.addShape();
titleTriangle.name = ("Title Triangle");
var titleTriangleGroup = titleTriangle.property("Contents").addProperty("ADBE Vector Group");
var titleTriangleFill= titleTriangleGroup.property("Contents").addProperty("ADBE Vector Graphic - Fill");
titleTriangleFill.property("Color").setValue([0.68,0.29,0.29,1]);

// using 'a' here
titleTriangle.property("Position").setValue([a,188]);
I found out - .value after slider.effect("Slider Control").property("Slider") and it works.

var a = slider.effect("Slider Control").property("Slider").value