Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Convert GUI "edittext" to a Number

$
0
0

Hi There

 

I´ve build a GUI with an edittext box where I want to put in numbers, to use them later for calculating, generating layers and so on.

But I always come along with NaN (Not a Number).

 

Script example:

 

var myWin = new Window("palette","Create a number of layers in a circle",undefined);

myWin.orientation = "column";

 

var groupOne = myWin.add("group", undefined, "GroupOne");

groupOne.orientation = "row";

 

groupOne.add("statictext", undefined, "Number of Pieces");

var inputNumber = groupOne.add("edittext", [0,0,40,20], "6");

 

 

 

How can I convert this edit text (6) from that string to a number, so that I can use it?

And, have I to check,  that my input text is a number?

 

 

THX for your help ....


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>