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

Add Vertical Scrollbar to the right of the Custom InDesign Palette

Participant ,
Nov 01, 2024 Nov 01, 2024

Copy link to clipboard

Copied

Hi Everyone,

 

I need your support in adding a vertical scrollbar to my custom palette for InDesign. The current palette is growing as I add a new button to it. so I want two vertical scroll bars, one for the 'Custom Checks' and the other for the 'Custom Fixes'. Here's my code:

If easily doable, can we also reduce the margins between the buttons.

 

Thanks, in advance,

M

 

#targetengine 'customChecksAndFixes'

// Create the panel window
var myWindow = new Window('palette', "Checks & Fixes - InDesign, v5.0", undefined, { resizeable: true });

// Add here a message "Please Save Your File Before Running a Script!"
var messageText = myWindow.add('statictext', undefined, "Save Your File Before Clicking a Button...");
messageText.alignment = 'center';

// Add buttons to the panel
myWindow.alignChildren = 'column';
myWindow.alignChildren = 'left';

// ************************************************ CUSTOM CHECKS – B U T T O  N S

var checkFonts = myWindow.add('button', undefined, 'CHECK - Fonts Status)');
var checkTextSize = myWindow.add('button', undefined, 'CHECK - Text Less than 6pt)');
var checkBaselineShift = myWindow.add('button', undefined, 'CHECK - Text with Baseline Shift)');
var checkRGB = myWindow.add('button', undefined, 'CHECK - RGB Image(s)');
var checkResolution = myWindow.add('button', undefined, 'CHECK - Effective Resolution Below 300');
var checkScaling = myWindow.add('button', undefined, 'CHECK - Image Scaling above 110%');
var checkProportional = myWindow.add('button', undefined, 'CHECK - Non-Proportionally Scaled Image(s)');
var checkEmbedded = myWindow.add('button', undefined, 'CHECK - Pasted & Embedded Image(s)');

myWindow.add('panel', undefined); // Creates a visual separator

// ************************************************ FIXES – B U T T O  N S

var removeSpaceBeforePunctuation = myWindow.add('button', undefined, 'FIX - Remove Double & Space(s) Before Punctuation');
var leadingFix = myWindow.add('button', undefined, 'FIX - Leading at the End of a Paragraph');
var fixSwatches = myWindow.add('button', undefined, 'FIX - Convert All Swatches to CMYK');
var reg2BlackFix = myWindow.add('button', undefined, 'FIX - Registration Colour to Black');
var strokeBelow025Fix = myWindow.add('button', undefined, 'FIX - Stroke Below 0.25pt');
var pasteBoardCleanup = myWindow.add('button', undefined, 'FIX - Delete Pasteboard Items');


// ************************************************ F U N C T I O N S


// Show the panel
myWindow.show();

Screenshot 2024-11-01 at 9.07.51 PM.png 

TOPICS
Scripting

Views

231

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 ,
Nov 01, 2024 Nov 01, 2024

Copy link to clipboard

Copied

Adding scrollbars to that kind of window layout is tricky. You'll find an example in here:

https://creativepro.com/files/kahrel/indesign/scriptui.html

In there you can also find how to change the space between buttons.

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
Participant ,
Nov 02, 2024 Nov 02, 2024

Copy link to clipboard

Copied

Thanks, Peter for the suggestions.

 

Can a single scroll bar be added to the right despite two?

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 ,
Nov 02, 2024 Nov 02, 2024

Copy link to clipboard

Copied

Yes it is.

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
Participant ,
Nov 02, 2024 Nov 02, 2024

Copy link to clipboard

Copied

Please help me with the code. I'm not a coder by profession.

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 ,
Nov 02, 2024 Nov 02, 2024

Copy link to clipboard

Copied

LATEST

As I said it's tricky, and I don't have the inclination to write the code for you. Partly because the ScriptUI (the system you used for your interface) is slowly degrading, and Adobe aren't going to do anything about it.

 

Try and find a script writer who'll do it for you in ScriptUI or redo it entirely in UXP.

 

Sorry I can't be of more help.

 

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