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

Script help with ToolTip

Explorer ,
May 15, 2024 May 15, 2024

Copy link to clipboard

Copied

I'm having a problem making my photoshop script button show a Tool Tip.

Heres an example of what i have so far

Anyhelp greatly appreciated. 

Thanks 

 

 // Create the button

var script3Btn = win.add("button", undefined, ":cinema:");

script3Btn.size = [40, 40];

 

// Adjust dimensions as needed to make it square

// Increase font size script3Btn.graphics.font = ScriptUI.newFont("Arial", "Bold", 22);

script3Btn.helpTip = 'Hello'; // Set tooltip

script3Btn.onClick = function() {

 

// Show the window

win.show();

TOPICS
Actions and scripting

Views

94

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

Community Expert , May 15, 2024 May 15, 2024

I tried to strip this back to basics:

 

var myWin = new Window("dialog"); 
    myWin.text = "My Window"; 
var cancelButton = myWin.add("button"); 
    cancelButton.helpTip = "This is a help tip!"; 
    cancelButton.text = "Cancel"; 
myWin.show();

Votes

Translate

Translate
Adobe
Community Expert ,
May 15, 2024 May 15, 2024

Copy link to clipboard

Copied

I tried to strip this back to basics:

 

var myWin = new Window("dialog"); 
    myWin.text = "My Window"; 
var cancelButton = myWin.add("button"); 
    cancelButton.helpTip = "This is a help tip!"; 
    cancelButton.text = "Cancel"; 
myWin.show();

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
Explorer ,
May 17, 2024 May 17, 2024

Copy link to clipboard

Copied

Hi Stephen

wow that took me so long to figure out

thanks for your answer.

It turn out i had new window ("palette") and not dialog

Heres my revised 'working' script

// CustomPanel.jsx

// Create a new window
var win = new Window("dialog", " ○ ━ ○ PEG-BAR", undefined);
win.orientation = "row"; // Set panel orientation to horizontal


// Create the button
//var script3Btn = win.add("button", undefined, ":cinema:");
var script3Btn = win.add("button");
script3Btn.text = ":cinema:";
script3Btn.helpTip = "This is a help tip!";

script3Btn.size = [40, 40];
// Adjust dimensions as needed to make it square

// Increase font size
script3Btn.graphics.font = ScriptUI.newFont("Arial", "Bold", 22);

script3Btn.onClick = function() {
// Your button click logic here

#target photoshop

 

 

and yes im making a new animation tool. 🙂 

Thanks again for your 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
Community Expert ,
May 17, 2024 May 17, 2024

Copy link to clipboard

Copied

You're welcome!

 

I hate working with scriptUI :]


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

 

https://scriptui.joonas.me/ (requires Chrome browser)

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
Explorer ,
May 17, 2024 May 17, 2024

Copy link to clipboard

Copied

LATEST

Great. Thanks for the links

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