Copy link to clipboard
Copied
I created a guide layout but I need it in the visible form of a path or stroke, how to convert it, thanks.
Try this script. It will draw a rectangle shape around the guide. Change the line width to what you want. It will center the shape on the guide.
#target photoshop
var lineWidth = 6
app.preferences.rulerUnits = Units.PIXELS;
var doc = activeDocument
var g = doc.guides
for(var i=0;i<g.length;i++){
var loc = g[i].coordinate.value
if(g[i].direction == 'Direction.HORIZONTAL'){
makeLine (loc-lineWidth/2, 0, loc+lineWidth/2, doc.width)
}
else{
makeLine (
...
This version of the script will allow you to use the color picker to set the line color. It will use the foreground color, if you want to just set the foreground color before hand and not use the picker, set the variable userColor to false.
#target photoshop
var lineWidth = 6
var userColor = true;
if(userColor){
app.showColorPicker()
}
var cRed = foregroundColor.rgb.red;
var cGreen = foregroundColor.rgb.green;
var cBlue = foregroundColor.rgb.blue;
app.preferences.rulerUnits = Units.P
...
Here's a script that will break all the vertical lines at the gutters.
#target photoshop
var lineWidth = 6
var userColor = false;
if(userColor){
app.showColorPicker()
}
var cRed = foregroundColor.rgb.red;
var cGreen = foregroundColor.rgb.green;
var cBlue = foregroundColor.rgb.blue;
app.preferences.rulerUnits = Units.PIXELS;
var doc = activeDocument
var g = doc.guides
var vertG = []
var horG = []
var coord = new Array();
for (i=0;i<g.length;i++){
if(g[i].direction == 'Direction
...
Copy link to clipboard
Copied
Can the texts fill in the margins of the textbox I have just defined the size?
Copy link to clipboard
Copied
Is the font types editable? It always sets the default.
Copy link to clipboard
Copied
The best to do is for the text to align into the guide margins within the size of the text box I have defined.
Copy link to clipboard
Copied
Can you show what you're getting when you run the script?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I'm not sure what to do about that, as I don't have a way to test that font on my computer. This is what I get when testing.
Copy link to clipboard
Copied
Pls tell me whether it can align with the text box.
Copy link to clipboard
Copied
Can it just stay in a text box rather than separate individually?
Copy link to clipboard
Copied
I'm not sure. Since I can't test how your font reacts on my computer, I'm not sure what I can do. Maybe what you want in each text box, can be put in a CSV file, then what goes in one box can be extracted properly.
I tried to make the script work to overflow to a new document, but suddenly, I have a very odd problem of one column of boxes have two characters in them. So far I can't figure out why that is happening.
Copy link to clipboard
Copied
Another option might be to just type out separate layers of text in a separate group, that the script will then attempt to align into the boxes. I'm really not sure how to solve this.
Copy link to clipboard
Copied
Thank you!