+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Newbie
    Join Date
    Oct 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with Web Style Documents

    Hello there, I basically make web designs at work which need to be split up into files and need style documents for the web stylists to use, which I can do but it seems like a lengthy process. The problem however is when I go to make a style document for the web stylists I am doing all the measurements manually, this seems to take up a lot of time. Is there any one who knows a way to make a web style document quickly, and by this I mean not having to do all the measurements in the design manually for each layer.

    These pictures illustrate what I've been doing so far, it would be helpful to also find a way of getting all the information about a text layer in one click of a button, like font, colour, size etc.

    Each jpeg would be for a specific purpose when the stylists look at my designs. One would be to label the measurements for the layout of the design, one would be for labeling text information on the design, and one for labelling where the split up files for the design are to be used within the design. But really I want to make all of these documents quicker to make, overall a page like this can take me up to an hour or more, which seems too long.

    Thanks for your time,

    James.

    Help with Web Style Documents-015-basket-page-%5Bmeasurement-labels%5D.pngHelp with Web Style Documents-000-basket-page-%5Btext-labels%5D.pngHelp with Web Style Documents-000-basket-page-%5Bfile-labels%5D.png

  2. #2
    The Script Master
    Join Date
    May 2009
    Location
    Bradford,UK
    Posts
    208
    Thanks
    0
    Thanked 39 Times in 34 Posts

    Re: Help with Web Style Documents

    This script might help with getting a text layer details.
    Just select a text layer and run the script, I have put the output in editboxes so that you can copy and paste if required...

    Code:
    #target photoshop
    main();
    function main(){
    if(!documents.length) return;
    if(activeDocument.activeLayer.kind != LayerKind.TEXT) return;
    var TxtLayer = activeDocument.activeLayer;
    var Colour = TxtLayer.textItem.color;
    var Font = TxtLayer.textItem.font;
    var TXTsize = TxtLayer.textItem.size;
    var win = new Window( 'dialog','Text Details');
    win.p1= win.add("panel", undefined, undefined, {borderStyle:"black"}); 
    win.g10 = win.p1.add('group');
    win.g10.orientation = "row";
    win.g10.alignment='left';
    win.g10.st1 = win.g10.add('statictext',undefined,'Text Colour');
    win.g10.st1.preferredSize=[100,20];
    win.g10.et1 = win.g10.add('edittext');
    win.g10.et1.preferredSize=[100,20];
    win.g10.et1.text= "#"+ Colour.rgb.hexValue;
    win.g20 = win.p1.add('group');
    win.g20.orientation = "row";
    win.g20.alignment='left';
    win.g20.st1 = win.g20.add('statictext',undefined,'Font Name');
    win.g20.st1.preferredSize=[100,20];
    win.g20.et1 = win.g20.add('edittext');
    win.g20.et1.preferredSize=[230,20];
    win.g20.et1.text=app.fonts[Font].name;
    win.g30 = win.p1.add('group');
    win.g30.orientation = "row";
    win.g30.alignment='left';
    win.g30.st1 = win.g30.add('statictext',undefined,'Font Size');
    win.g30.st1.preferredSize=[100,20];
    win.g30.et1 = win.g30.add('edittext');
    win.g30.et1.preferredSize=[100,20];
    win.g30.et1.text=Number(TXTsize).toFixed(2);
    win.g40 = win.p1.add('group');
    win.g40.orientation = "row";
    win.g40.alignment='left';
    win.g40.st1 = win.g40.add('statictext',undefined,'Pixel Size W x H');
    win.g40.st1.preferredSize=[100,20];
    win.g40.et1 = win.g40.add('edittext');
    win.g40.et1.preferredSize=[100,20];
    var startRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    var LB=TxtLayer.bounds;
    var Width = LB[2].value - LB[0].value;
    var Height = LB[3].value - LB[1].value;
    app.preferences.rulerUnits = startRulerUnits;
    win.g40.et1.text=Width + " x " + Height;
    win.g300 = win.p1.add('group');
    win.g300.orientation = "column";
    win.g30.alignment='fill';
    win.g300.bu1 = win.g300.add('button',undefined,'Done');
    win.g300.bu1.preferredSize=[350,30];
    win.g300.bu1.onClick=function(){
        win.close(0);
        }
    win.center();
    win.show();
    }

  3. #3
    Newbie
    Join Date
    Oct 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with Web Style Documents

    Thanks very much Paul, I tried this script and it will certainly save me some time on the text information front.

    Brilliant stuff : )

 

 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Powered by vBulletin® Version 4.1.9
Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.
Content Relevant URLs by vBSEO 3.6.0
Copyright 2011 Photoshop Gurus Forum. All rights reserved.
All times are GMT -5. The time now is 02:13 PM.
vBulletin Skins