Skip to main content
Known Participant
June 6, 2024
Answered

Run Scripts'' Please Wait " UI massage box ( help me ) #Photoshop

  • June 6, 2024
  • 1 reply
  • 431 views

I want the massage box "please wait" to appear while running scripts that are waiting for a long time...

 

I have some scripts that wait for 30 seconds so is there any script that I can integrate to pop up the please wait massage box while the scripts are running?

This topic has been closed for replies.
Correct answer willcampbell7

@Stephen Marsh thanks for the shoutout.

For a simple "working on it" message, this is what I use...

 

// CREATE WORKING WINDOW

var working = new Window("palette");
working.preferredSize = [300, 80];
working.add("statictext");
working.t = working.add("statictext");
working.add("statictext");
working.display = function (message) {
	this.t.text = message || "Working... Please wait...";
	this.show();
	app.refresh();
};

// USAGE

working.display();

// Gives the default message. Want something else? Pass it.

working.display("A different message");

// When done...

working.close();

// It is also possible to .hide() and .show the window.

working.hide(); // It goes away but still exists.

working.show(); // Now it is back.

 

 

1 reply

Stephen Marsh
Community Expert
Community Expert
June 7, 2024

Here it is, courtesy of @willcampbell7  –

 

https://youtu.be/PSLEM-UO16Y?si=tDrb618G53xFsXBe

 

https://youtu.be/JXPeLi6uPv4?si=rIIL2M2ute2pAH0Q

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/jpeg-with-outline-path-to-transparent-png-files-conversion/td-p/13055741

 

Or perhaps with a CEP or UXP Panel?

 

As a simpler alternative, maybe you could hide all panels at the start of the script, then restore the panels afterwards as a visual indication of processing (this has the added benefit of slightly speeding up the runtime when batch processing):

 

// Hide the Photoshop panels
app.togglePalettes();

 

willcampbell7
willcampbell7Correct answer
Legend
June 8, 2024

@Stephen Marsh thanks for the shoutout.

For a simple "working on it" message, this is what I use...

 

// CREATE WORKING WINDOW

var working = new Window("palette");
working.preferredSize = [300, 80];
working.add("statictext");
working.t = working.add("statictext");
working.add("statictext");
working.display = function (message) {
	this.t.text = message || "Working... Please wait...";
	this.show();
	app.refresh();
};

// USAGE

working.display();

// Gives the default message. Want something else? Pass it.

working.display("A different message");

// When done...

working.close();

// It is also possible to .hide() and .show the window.

working.hide(); // It goes away but still exists.

working.show(); // Now it is back.

 

 

William Campbell
Known Participant
June 8, 2024

This is cool . . . Thank you so much Sir @willcampbell7