RetouchPRO

Go Back   RetouchPRO > Tools > Software > Photoshop Scripting

Notices

Photoshop Scripting Learning and sharing for all platforms

Reply
 
LinkBack Thread Tools
  #1  
Old 01-04-2005, 11:14 AM
Junior Member
 
Join Date: Dec 2004
Posts: 14
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;

}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #2  
Old 01-12-2005, 06:32 AM
Member
 
Join Date: Aug 2004
Posts: 35
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #3  
Old 01-12-2005, 06:58 AM
Junior Member
 
Join Date: Dec 2004
Posts: 14
that did it: i set the units to pixels runtime, et voila! thx m8!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange layer problem BenHardy Image Help 7 09-23-2007 06:58 PM
Strange B/W color desaturation saberlancer Software 6 01-29-2007 01:07 AM
Something strange going on In PS Swampy Software 5 11-11-2006 12:20 PM
Another strange texture - what is it? Caitlin Image Help 9 05-04-2005 06:17 PM
Strange XP cable modem behavior jeaniesa Software 10 08-25-2002 09:32 AM


All times are GMT -6. The time now is 01:43 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 2008 Doug Nelson. All Rights Reserved




1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51