Hey Uwe! Thanx for your answer. Finally, I want to start a query, where the user can enter a colour (by means of a number). The individual values of the selected colour are used later for tables (lines, areas and font). This first part of the script will be a small database with the colour values. That is what I made of your script: var myDoc = app.documents[0]; var colourArray = []; var x; colourArray[0] = {name : "SF_Rot", colorValue: [15,100,100,0], model: ColorModel.PROCESS, space: ColorSpace.CMYK}; colourArray[1] = {name : "SF_Grau", colorValue: [0,0,30,50], model: ColorModel.PROCESS, space: ColorSpace.CMYK}; colourArray[2] = {name : "SF_Service", colorValue: [80,0,35,0], model: ColorModel.PROCESS, space : ColorSpace.CMYK}; function createColour() { var i = 0; start: while(true) { colourSwatch = prompt("Which color do you want to use? \r" + "1 = SF_Rot\r2 = SF_Grau\r3 = SF_Service", "" ); i++; if(colourSwatch>colourArray.length || colourSwatch<1) continue start; break; } return colourSwatch; } createColour(); alert ([colourArray[colourSwatch-1].colorValue]); I changed the name of each array-content to an index-number bacause I later need that as a number (selection/input) regards Andreas
... View more