![]() |
|
#1
| |||
| |||
| strange..... I have CS, so does my friend. So i made a script in JS that does loads of things....... One of them is that i am making a selection and filling it with a color, like beneath, BUT it works on 3 different pc's with CS, but at my friends PC it just draws a 1x2 pixels (hxw) square, instead of filling the whole layer (doc.width and doc.height).....this puzzles me a LOT! He reinstalled many times already, still nogo...... Any thoughts? the problem seems the size of selection (doc.selection.select(selectionBounds,SelectionType.REPLACE,0,false); ) //create the 4 backgroundlayers with colors var selectionBounds = [[0,doc.height],[doc.width,doc.height],[doc.width,0],[0,0]]; for (var b = 0;b<4;b++) { var newLayerRef = doc.artLayers.add(); newLayerRef.name = layerBGArrNames[b]; var randomColor = new SolidColor; randomColor.rgb.red = layerBGArrColors[b][0]; randomColor.rgb.green = layerBGArrColors[b][1]; randomColor.rgb.blue = layerBGArrColors[b][2]; doc.selection.select(selectionBounds,SelectionType.REPLACE,0,false); doc.selection.fill(randomColor); doc.selection.deselect(); randomColor = null; } |
|
#2
| |||
| |||
| check the prefs Verify that your ruler units preferences are set explicitly and consistently. And remember that not all apis will take all units. Some, apparently, require pixels units. Units are not dealt with very well in JS. ciao, -X |
|
#3
| |||
| |||
| that did it: i set the units to pixels runtime, et voila! thx m8! |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strange layer problem | BenHardy | Image Help | 7 | 09-23-2007 05:58 PM |
| Strange B/W color desaturation | saberlancer | Software | 6 | 01-29-2007 12:07 AM |
| Something strange going on In PS | Swampy | Software | 5 | 11-11-2006 11:20 AM |
| Another strange texture - what is it? | Caitlin | Image Help | 9 | 05-04-2005 05:17 PM |
| Strange XP cable modem behavior | jeaniesa | Software | 10 | 08-25-2002 08:32 AM |