• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Transforms guides into lines [2017]

Advocate ,
Jul 20, 2017 Jul 20, 2017

Copy link to clipboard

Copied

good morning

I'm new to this place

 

I would like to know if there is a way to transform the guides into lines

 

As in the case

 

thank you

 

Schermata 2017-07-20 alle 11.28.00.png

TOPICS
Actions and scripting

Views

26.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Jul 21, 2017 Jul 21, 2017

//Requires Photoshop CS5 or newer

#target photoshop;

if(documents.length) app.activeDocument.suspendHistory('Stroke Guides', 'main()');

function main(){

activeDocument.artLayers.add();

activeDocument.activeLayer.name="Stroked Guides";

app.showColorPicker();

var newColour = app.foregroundColor;

var guideSize = Window.prompt("Please enter Stroke Size!","1");

var guides = app.activeDocument.guides;

var guideArray = [];

for( var g = 0; g < guides.length; g++ ){

    singleLine(guides.direction.toString(), Numbe

...

Votes

Translate

Translate
Adobe
Community Expert ,
Jan 11, 2024 Jan 11, 2024

Copy link to clipboard

Copied

I just get a Syntax Error:

 

selondon_0-1704978559713.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 11, 2024 Jan 11, 2024

Copy link to clipboard

Copied

Could you please post screenshots taken at View > 100% with the pertinent Panels (Toolbar, Layers, Options Bar, …) visible? 

 

I cannot reproduce the problem on Photoshop 25.3.1 on Mac OS 14.1.2.

The first line being 

if (documents.length) app.activeDocument.suspendHistory('Stroke Guides', 'main()');

the alert you get seems strange. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 11, 2024 Jan 11, 2024

Copy link to clipboard

Copied

LATEST
quote

I just get a Syntax Error:

 

selondon_0-1704978559713.png

 


By @selondon


The screenshot error indicates that the script was saved as an RTF or Rich Text Format file - when it should have been saved as a plain text format file. This is a common issue for Mac users of Apple Text Edit app.

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html?m=1

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 11, 2024 Jan 11, 2024

Copy link to clipboard

Copied

Hi,

 

Thanks for looking at this

 

Here's the screenshot:

 

Screenshot 2024-01-11 at 13.50.03.png

 

I have attached the .jsx as a .txt file (seems to work on a colleagues Mac)

 

I am running PS 25.3.1 on Ventura 13.6.1

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 11, 2024 Jan 11, 2024

Copy link to clipboard

Copied

jsx, not txt! 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 11, 2024 Jan 11, 2024

Copy link to clipboard

Copied

Yep.... couldn't attach a .jsx or .zip so just changed extenstion

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 11, 2024 Jan 11, 2024

Copy link to clipboard

Copied

Please try removing the useless first line. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 11, 2024 Jan 11, 2024

Copy link to clipboard

Copied

Thanks for you help. It seems to be solved now, with the script unchanged.

 

I redownloaded the one I send to my colleague, deleted the one in the folder, re-added it again and it's working.

 

Cheers

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines