Click to See Complete Forum and Search --> : Newbie needs java Help !!!
Paul33
05-06-2003, 06:25 AM
The link below is to a simple Photoshop 7 javascript that incorporates a filename as a text layer for an image.
http://share.studio.adobe.com/axAssetDetailSubmit.asp?aID=5411&back=http%3A%2F%2Fshare%2Estudio%2Eadobe%2Ecom%2FaxBrowseSubmit%2Easp%3Ft%3D74
I need this modified to produce a bigger fontsize (30pt), a different font (Arial) and a different color text (red). I also need to ensure the resulting text fits on the image.
I can do the first two by modifying what i can see in the script but how do I change the color ?
Any help or modified script would be appreciated !
khalidali63
05-06-2003, 06:33 AM
to change the forn color in html use stylesheet property color,
color:red;
etc. for more details on this visit
http://w3c.org
Paul33
05-06-2003, 06:38 AM
But I surely need this done via javascript as I need to run it within Adobe Photoshop ...... where does HTML come into it ?
Sorry, I'm probably being dumb here !!!
khalidali63
05-06-2003, 06:45 AM
Suppose you have an element td a table cell
<td id="td_1" onclick="ChangeColor();">Some value</td>
and you want to change the color at runtime by clicking this cell
first you create a reference to the html element of which css property needs be changed.
<script type="text/javascript">
function ChangeColor(){
var el = document.getELementById("td_1");
//now change the color style
el.style.color="green";
}
</scriupt>
Paul33
05-06-2003, 06:54 AM
All that I can do in Photoshop is call and run a javascript thus I simply need to know how to enhance that javascript. I still don't see where html, css, table cells, etc come into it ...... but then again, I'm not a programmer so maybe I'm looking for something that isn't possible.
I was rather hoping somebody might take this very small script, modify it and send it back to me ........ my brain can handle that !!!
Thanks for the prompt replies btw !
khalidali63
05-06-2003, 06:57 AM
I am sorry,are you trying to change font color within Photoshop?...or you want to change the color of the text in or on top of an image?????
if the later then my code will work..otherwise my bad for not being completely awake..
:D
Its early ya know
Paul33
05-06-2003, 07:05 AM
Hey, it's not early here in the UK ....... I've just had lunch !
The script gets Photoshop to create an image layer onto which it types the image filename using the Photoshop text tool.
Unfortunately the script has no text color parameter thus produces black type which you can't always see.
I'm sure the solution is easy, I just don't know what I'm doing with javascript !!!
PS: If you look at the script, I'm sure you'll work it out !
khalidali63
05-06-2003, 09:32 AM
ok..post a link to the page or post he code in question..,I'll take a look