Skip to main content
e-onn
Inspiring
May 15, 2024
Answered

Script help with ToolTip

  • May 15, 2024
  • 1 reply
  • 499 views

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, "🎦");

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();

This topic has been closed for replies.
Correct answer Stephen Marsh

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();

1 reply

Stephen Marsh
Community Expert
Stephen MarshCommunity ExpertCorrect answer
Community Expert
May 16, 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();
e-onn
e-onnAuthor
Inspiring
May 17, 2024

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, "🎦");
var script3Btn = win.add("button");
script3Btn.text = "🎦";
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

Stephen Marsh
Community Expert
Community Expert
May 17, 2024

You're welcome!

 

I hate working with scriptUI :]


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

 

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