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

Script help with ToolTip

Explorer ,
May 15, 2024 May 15, 2024

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
397
Translate
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();
Translate
Adobe
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();
Translate
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

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

Translate
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

You're welcome!

 

I hate working with scriptUI :]


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

 

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

Translate
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
LATEST

Great. Thanks for the links

Translate
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