How "Not to Select" line break with triple click?

New Here ,
Jun 09, 2020 Jun 09, 2020

Copy link to clipboard

Copied

I have a huge amount of copy-and-paste text with headings, paragraphs and different styles. I'm selecting a line of text with triple click. It works ok but it also selects the invisible line break character at the end of the line. So when i paste new text over the selected one the following text comes at the end of it and i have to hit enter every time to put it back to where it was.

Is there a way "not to select" the line break character with triple click?

 

TOPICS
How to

Views

384

Likes

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

Advisor , Jun 09, 2020 Jun 09, 2020
Using a KB shortcut associated to something "simplistic" like that to select, placing the cursor in text, all the para without the carriage-return! …   // by FRIdNGE, Michel Allio [09/06/20] var ip = app.selection[0].paragraphs[0].insertionPoints; if ( app.selection[0].paragraphs[0].characters[-1].contents == "\r" ) ip.itemByRange(0,-2).select(); else ip.itemByRange(0,-1).select(); (^/)  The Jedi

Likes

Translate

Translate
Advisor ,
Jun 09, 2020 Jun 09, 2020

Copy link to clipboard

Copied

Using a KB shortcut associated to something "simplistic" like that to select, placing the cursor in text, all the para without the carriage-return! …  😉

 

// by FRIdNGE, Michel Allio [09/06/20]
var ip = app.selection[0].paragraphs[0].insertionPoints;
if ( app.selection[0].paragraphs[0].characters[-1].contents == "\r" ) ip.itemByRange(0,-2).select();
else ip.itemByRange(0,-1).select();

 

(^/)  The Jedi

 

Likes

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
New Here ,
Jun 15, 2020 Jun 15, 2020

Copy link to clipboard

Copied

This solution works great!

Thank you 🙂

Likes

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
New Here ,
Dec 30, 2020 Dec 30, 2020

Copy link to clipboard

Copied

Hey there, sorry in advance for the dumb question. Where do enter this magical bit of code? I'd love to be able to triple click without selecting the paragraph break at the end of the line. Thanks.

Likes

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
New Here ,
Dec 30, 2020 Dec 30, 2020

Copy link to clipboard

Copied

Hi! Not a dumb question at all 🙂

This is a javascript code, so first you need to create a script file in a plain text editor like SublimeText, Notepad or some app like those, paste the code in and save the file with .jsx extension (name it anything you want). Put the file into the Adobe InDesign [xxxx]/Scripts/Scripts Panel/Samples/Javascript folder. Then from the Edit menu select Keyboard Shortcuts... , find your script and assign a keyboard shortcut to it. That's it! A bit of a work but a true lifesaver.

Likes

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
New Here ,
Dec 30, 2020 Dec 30, 2020

Copy link to clipboard

Copied

Hey, thanks so much for the reply. For some reason my .jsx file is not showing up in the Keyboard Shortcuts pane? I can see the .jsx files that appear above and below it in the finder view, but not the one I created.

Likes

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
New Here ,
Dec 30, 2020 Dec 30, 2020

Copy link to clipboard

Copied

Did you try to restart InDesign, i forgot to mention that.

Likes

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
New Here ,
Dec 30, 2020 Dec 30, 2020

Copy link to clipboard

Copied

Yep, tried that. I can see my file in the Scripts panel in indd, but it has the little i next to it instead of the javascript icon, and when I hover over it I get: "This file is not executable by any supported script language."

I tried re-pasting the code and made sure it was identical, but still no dice? I used the same naming convention as the other script files as well?

Likes

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
Adobe Community Professional ,
Dec 31, 2020 Dec 31, 2020

Copy link to clipboard

Copied

LATEST

Make sure the code is set as plain text—you might have to specify plain text in your text editor. For example in Apple’s Text Editor, select the text and choose Make Plain text under the Format menu:

 

Screen Shot 5.png

Likes

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