string.length
Why does this return a tring length of 1?
function bang()
{
api = new LiveAPI(this.patcher, "live_set tracks 0 clip_slots 0 clip");
var CLIPNAME=api.get("name");
var TEST=CLIPNAME.length;
post (TEST);
}
Thank you.
That heavily depends on the contents of the clipslot you mention. For example; for all we know it could contain a clip which is named "1".
I believe you are parsing the length of an ARRAY, as that is what the API returns as a result of get('name'). Try var TEST=CLIPNAME.join().length instead, I think that will work.
Cheers.
Yes, that works. Thank you very much amourna.
Ok, I'll move on with my patch till the next hurdle. :)