About progress bar and Photoshop

I have been reading a lot about how to make a progress bar in photoshop (scripting) and my conclusion is that it is not worthy. The only way to make a progress bar is by using Palette window but Photoshop does not support it. If we use a dialog window, since it is modal, it will freeze whatever your script is doing so, you cannot use it (how to track the progress of a script if the script is paused while the dialog is being shown?). Although Photoshop does not support Palette, there are two workarounds that would make it work and they are using either app.refresh() or waitForRedraw() (and undocumented function that seems to me to do exactly the same thing that app.refresh() does). But as the manual says, app.refresh() will slow down considerably your code. According to my experimentation, each time you call app-refresh(), your script will waste about 1 second (no matter how powerful your computer is). That is a lot of time! In practical terms, you would use app.refresh() only a few times so your progress bar could be refreshed only a few times during the whole duration of your script, still one second lost for each time you use it. In other words, there is no good way of making a progress bar in photoshop scripting.
My question is: am I right? Is there a way to code a progress bar in PS that would not delay the code unreasonably?

Since I wrote that post I've learnt that BridgeTalk is pretty sensitive - for instance to binary code: instead to let .toSource() functions that needs to go to the message, you'd better of wrapping them into a String literal.
True, AM is lightning fast compared to DOM! But I won't use BridgeTalk for a Palette if the Palette is needed just for a progress bar. Such a Palette will stay alive while your script does all the things it's supposed to do without the need of waitForRedraw().
In my snippets library I've found this one that might help:
* Create a progress window
* @param  {String}  title           = title
* @param  {String}  message         = message (updatable)
* @param  {Boolean} hasCancelButton = add a Cancel button (default: false)
* @usage          w = new createProgressWindow "Title", "Message", true
createProgressWindow = function(title, message, hasCancelButton) {
  var win;
  if (title == null) {
    title = "Work in progress";
  if (message == null) {
    message = "Please wait...";
  if (hasCancelButton == null) {
    hasCancelButton = false;
  win = new Window("palette", "" + title, undefined);
  win.bar = win.add("progressbar", {
    x: 20,
    y: 12,
    width: 300,
    height: 20
  }, 0, 100);
  win.stMessage = win.add("statictext", {
    x: 10,
    y: 36,
    width: 320,
    height: 20
  }, "" + message);
  win.stMessage.justify = 'center';
  if (hasCancelButton) {
    win.cancelButton = win.add('button', undefined, 'Cancel');
    win.cancelButton.onClick = function() {
      win.close();
      throw new Error('User canceled the pre-processing!');
  this.reset = function(message) {
    win.bar.value = 0;
    win.stMessage.text = message;
    return win.update();
  this.updateProgress = function(perc, message) {
    if (perc != null) {
      win.bar.value = perc;
    if (message != null) {
      win.stMessage.text = message;
    return win.update();
  this.close = function() {
    return win.close();
  win.center(win.parent);
  return win.show();
Cheers,
Davide

Similar Messages

  • I am installing the latest update on Mountain lion. ( Itunes) . Screen went light gray, no progress bar, and is been running for about two hours. Help!

    I am installing the latest update for Mountain lion (the iTunes update) . The screen went light gray, with no progress bars, and has remained that way for several hours. Help!

    In this case, hold the Power button until your computer turns off, and then, turn your Mac on again. It looks like your computer got stuck during its restart, so it shouldn't harm anything on your computer

  • Is it possible to use a progress bar in Photoshop?

    Hi,
    I'm developing an automation plug-in to Photoshop. It take long time to do the work, I therefore want to start a none modal dialog with a progress bar and a cancel button. I did not find any example of this in the SDK. Is it possible to use any of the functions in the PIProgressSuite.h for this kind of dialog?
    Regards,
    Mattias

    I don't think you will have much luck with the progress suite. It is used for one operation that your plug-in would control. You are probably using multiple Photoshop events and want to sum them up in a progress bar. Ideally you would want a double progress bar, one for the overall progress and one for the step progress. Unfortunately, the progress suite will get reset with each process that Photoshop tries to show progress for. Your best bet is to just use an OS progress bar in your dialog. Figuring out the progress will be dificult.

  • Progress bars and threads...

    Hey...
    I've had many replies on my previous questions about progress bars. I thank everybody who was concerned. But i still don't know if i have to use a seperate thread to run the progress of my bar... Can i have a progress bar in a Frame updating the progress of some file loading without having it in a seperate thread ?? I mean if i have an application that runs a Frame, this frame has buttons, textfields and other stuff, one of the buttons uploads a file chosen to a server. Now i also have a progress bar, can it keep progress of the upload without having it in a seperate thread ?? If yes, then how. Cause i can't seem to make it move unless the upload is done... I also want to know that, if i have to use a seperate thread, do i have to use something called a SwingWorker ???

    Here's the deal....
    If you don't use a separate thread, then your file upload process will block the main ("dispatch") thread until it has finished. This means that the GUI will not be updated to show your ever-growing progress bar. You'll see the bar start at zero, and then nothing will happen until the file finishes uploading, and then the bar will show 100%.
    Even if you are updating the bar in a loop, changes will still not be displayed, because repaint requests get put on a queue, and they are executed only when the VM decides it has time to do them (ie when it's finished doing your file upload!)
    So, yes you do need to use a thread to load your file and change your progress bar. and if that thread will update any GUI elements directly, start it by calling SwingUtilities.invokeLater(myThread). Also, make sure you do "myThread.setPriority(3);" (or thereabouts - make sure it's less than 5) on the thread before invoking it. This way, the main thread that updates the gui will have priority, so will update regularly.

  • When i try to restore my iPad it gets stuck a quarter along the progress bar and won't restore.

    Ok so i downloaded the 4.3.3 update and tried updating but it got stuck about a quarter of the way along the progress bar and won't move. I unplugged it and plugged it in again then tried a restore, it did the same thing, i've done it about 5 times now and it still gets stuck in the same spot each time. I put it into DFU mode and tried a restore but it still won't. Help?

    Hi Tulips 14,
    If you are having reoccuring Error 21 notices when trying to restore your iPhone, you may find the following article helpful, in particular the "Check for Hardware Issues" portion:
    Apple Support: Resolve specific iTunes update and restore errors
    http://support.apple.com/kb/TS3694
    Regards,
    - Brenden

  • Splash screen with progress bar and multiple jar files to load

    Hello,
    I have been looking to the new features in java 6 for splash screens. I haven't implemented this never before and i was wondering how i could do the following with java 1.5 or 6:
    I would like to see a splash screen with a progress bar that "grows" when every jar file has been read.
    At this time i call my application like this from a shell script:
    exec "$JAVA_BIN" -Djava.library.path=$LIBRARIES_J3D -classpath xxxx.jar yyyy.jar zzzz.jar ...
    where xxx.jar, yyy.jar and zzz.jar are very heavy jars.
    So i would like to see in the progress bar 33% 66% and 100% when they are loaded.
    I do not know if this is the right forum to ask for this. If no, please point me which would be the ideal one.
    Any help will be very useful. Thanks to all!

    Am 10.07.2015 um 07:17 schrieb Lalit Solanki:
    > Hi friend,
    >
    > I am create pure eclipse E4 application and trying to splash screen with progress bar and message.
    >
    >
    >
    >
    > but above image in only support eclipse E3 application so pleas help me how to add progress bar and message in eclipse E4 application
    >
    Hi Lalit,
    there's a Bug entry: https://bugs.eclipse.org/bugs/show_bug.cgi?id=382224
    Meanwhile you can use this solution:
    https://www.eclipse.org/forums/index.php/t/328812/5ceed4bcaa683a94d65efb161bffd217/
    Regards,
    Ralf.

  • How to change the color of the progress bar and string

    Is their anyway to change the color of the progress bar and the string which shows the progress of the bar. The current color of the bar is purple and i would like it to be red or blue so that it stands out against the background of the JFrame i am using. I dont want to change the color of the JFrame
    Thanks in advance

    import java.awt.*;
    import javax.swing.*;
    public class ProgressEx {
        public static void main(String[] args) {
            UIManager.put("ProgressBar.background", Color.WHITE);
            UIManager.put("ProgressBar.foreground", Color.BLACK);
            UIManager.put("ProgressBar.selectionBackground", Color.YELLOW);
            UIManager.put("ProgressBar.selectionForeground", Color.RED);
            UIManager.put("ProgressBar.shadow", Color.GREEN);
            UIManager.put("ProgressBar.highlight", Color.BLUE);
            JFrame f = new JFrame("Test");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JProgressBar pb1 = new JProgressBar();
            pb1.setStringPainted(true);
            pb1.setValue(50);
            JProgressBar pb2 = new JProgressBar();
            pb2.setIndeterminate(true);
            Container cp = f.getContentPane();
            cp.add(pb1, BorderLayout.NORTH);
            cp.add(pb2, BorderLayout.SOUTH);
            f.pack();
            f.setVisible(true);
    }

  • Show progress bar and percents when packaging a native installer with adt packager

    Hello,
    Below is a simple example using the AIR's NativeProcess for compiling an air application into a native installer... Everything works fine, so at the end of the NativeProcess, the native installer (*.exe) is created... In this case, the application which I'm trying to compile is small (approx. 600KB)... However, if I have to package into native installer a bigger file (several MBs), I would like also to monitor the progress by using a progress bar and percents... How?
    private var file:File
    private var nativeProcessStartupInfo:NativeProcessStartupInfo;
    private var nativeProcess:NativeProcess;
    private function compile():void{
      file = new File("C:\\Program Files\\Java\\jre7\\bin\\java.exe");
      nativeProcessStartupInfo = new NativeProcessStartupInfo();
      var args:Vector.<String> = new Vector.<String>();
      args.push("-jar");
      args.push(adtPath);
      args.push("-package");
      args.push("-storetype");
      args.push("pkcs12");
      args.push("-keystore");
      args.push(certPath);
      args.push("-storepass");
      args.push("mypass");
      args.push("-target");
      args.push("native");
      args.push(exePath);
      args.push(xmlPath);
      args.push("-C");
      args.push(swfPath);
      args.push("testApp.swf");
      args.push("icons");
      nativeProcessStartupInfo.arguments = args;
      nativeProcessStartupInfo.executable = file;
      nativeProcess = new NativeProcess();
      nativeProcess.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData);
      nativeProcess.addEventListener(ProgressEvent.STANDARD_ERROR_DATA, onErrorData);
      nativeProcess.start(nativeProcessStartupInfo);
    private function onOutputData(event:ProgressEvent):void{
       var op:String =  nativeProcess.standardOutput.readUTFBytes(nativeProcess.standardOutput.bytesAvailable);
       trace("output = " + op);
    private function onErrorData(event:ProgressEvent):void{
       var er:String = nativeProcess.standardError.readUTFBytes(nativeProcess.standardError.bytesAvailable);
       trace("error = " + er);
    Thanks in advance,
    Nikola

    Someone to offer a solution to this problem (if exists)?

  • I am a member of creative cloud.  I had hard drive trouble.  How do I go about redownloading lightroom and photoshop cc

    Hi,
    I am a member of creative cloud.  I had hard drive trouble.  How do I go about redownloading lightroom and photoshop cc

    Refer
    Creative Cloud Help | Download, install, update, or uninstall apps

  • MacBook Pro frozen on startup screen with progress bar and then it turns off

    Hello, I have a MacBook Pro 15" of early 2012 with a i5 Intel, 4GB of RAM  and a  500 GB HD.
    I was installing the new suit of Adobe, when suddenly my Mac got frozen, vertical coloured lines appeared and the image on screen went distorted. I had to reboot the Mac by holding the power button until the screen turned off and when I turned it on, the lines appeared again and it itself automatically rebooted. Then the screen (now with no vertical lines) got frozen on the startup grey screen with the apple logo and the spinning wheel for hours with no response.
    I tried to follow the steps of the official mac forums like verifying the HD with CMD+R and then Disk Utility, it says everything's fine; the same happens with CMD+S, no errors. I reinstalled Mavericks with the same CMD+R. I already reset the PRAM, SMC  and performed a Safe Boot staring up in Single user mode and Verbose Mode and nothing, the same startup screen. I made too thins thing of holding shift until the progress bar appeared.  Three days later (Today) I repeated the steps again and finally the verbose mode. Now, when I turn it on, the startup screen appears again (Apple Log and spinning wheel) with a progress bar. When it completes, the Mac turn itself off.
    if you can help me, please. I don't know what else to do. The last thing is technical service.

    Hi again ggt15,
    You can find some more information about the Recovery Partition of your hard drive here:
    OS X: About OS X Recovery
    http://support.apple.com/kb/HT4718
    It sounds like you might be trying to reinstall your copy of the operating system. If that's the case, you may also find some helpful information here:
    OS X Lion: Reinstall Mac OS X
    http://support.apple.com/kb/PH3878
    Thank you for using the Apple Support Community. Due to the nature of your issue or question you may find more information by using another one of Apple's support resources - https://expresslane.apple.com/GetproductgroupList.action.
    Cheers,
    Braden

  • HT4623 My iPhone 4 has become unresponsive during the update. It's showing a progress bar and has not moved for over half an hour can anyone help ?

    My iPhone 4 has become unresponsive during the latest update I have a progress bar about half way through the update and it hasn't moved for about an hour can anyone help???

    Hey Ali.M27,
    Thanks for the question. I understand you are experiencing issues with your iPhone during an iOS update. If your issues persist, you may need to restore your device in recovery mode:
    iOS: Unable to update or restore
    http://support.apple.com/kb/HT1808
    Thanks,
    Matt M.

  • Safari 4.0 progress bar and Top Sites bugs (?)

    Hi there,
    I am having a problem with my Safari 4 and been searching for a fix since a few days but could not find a solution, so I hope there is someone who can help me out.
    There are basically two problems, I have with Safari.
    The first one is, that since Safari 4.0 there is a new kind of a "progress bar" which changes its color and is actually at first dark and then gets more light while loading a page. My progress bar is not chaning colors at all. It just stays dark all the time.
    And the second one, is that if you have a site on you "Top Sites" and click that, it fades in, so it comes nearer and gets larger until it fits the window. So, if you go back from that site to you "Top Sites" again, it actually should fade out and move back to its old position on the "Top Sites". And again, my Safari does not do that either.
    I don't know, if that is improtant or not, but I played around with the Safari 4 beta tweaks and changed the progress bar so I have the blue one in the background of my adress bar.
    I already tried to restore my old Safari from my Programs folder with Time Machine and installed the 4.0 again but still, it does not work for me.
    I know that these are not somehow critical bugs but it would be great, if Safari would just work, as it actually should.
    So, is there a way to fix that or reset Safari?
    Thank you in advance!

    Hi
    Latest v of Glims (17) is Safari 4 compatible. Cooliris is functional, although a soon to be released upgrade will correct certain S4 related bugs. Tab Expose is not S4 compatible.
    There is no blue progress bar in Safari 4. In S4 Beta, Terminal code was used to bring that S3 feature back, however, S4 final has removed the related code. Hence, no blue progress bar. Instead, there's a spinning gear to the right of the Address Bar indicating the page is loading.
    Let Apple hear your sentiments about S4. Send feedback to Apple via the Safari Menu>Report bugs to Apple.

  • Mac Stuck at Startup Screen with Grey Apple Logo,Empty Progress Bar and a Spinning wheel

    Last night the electricity went out and my power surge protector was not working so my iMac just force shut downed.
    So, when the electricity came back i turned on my Mac but it is *Stuck in the Startup/Boot Screen with a Grey Apple Logo,a Empty Progress Bar with stays for 1 or 2 minutes and a small Spinning Wheel which would Spin Forver! I Have tried the SMC and Pram reset but no use, i have also tried to insert my OS X Lion 10.7 Installation disk and it would not load if i hold the C Key in the Startup, I Have Managed to go to Disk Utility Through "Recovery HD"  but the Volume "Macintosh HD" is Greyed out and Unmounted and i cannot repair it. There are some files that i'd like to Recover if there is a way to fix it without deleting files.
    **PLEASE HELP ME FIX THIS!**
    Details about the iMac:
    iMac 21.5 Inch i think from Mid 2010,
    OS X Lion installed maybe 10.7.2 or 10.7.3 (im not sure)

    kernel
    Grey screen with Metallic Apple and spinning gear
    Sounds to me like your hard drive failed on you as a result of the power going out.
    http://www.apple.com/support/imac-harddrive/
    If your iMac is a Mid 2010 you qualify for the hard drive replacement program from Apple.
    Apple has determined that certain Seagate 1TB hard drives used in 21.5-inch and 27-inch iMac systems may fail. These systems were sold between October 2009 and July 2011.
    I hope I helped you with your problem.
    - Brandon

  • Slow Progress Bar on Photoshop CS5

    POSTED ON 18/2/12
    Hi,
    I need help with Photoshop CS5.1 v12.1 ,
    Problem: When ever i insert a gradient or a photo it comes up with a progress bar which takes ages to load and it used to load in 1 second but now it takes ages , i have looked every where but there was no results and i really need help because i am currently editing a Wedding Movie in a different Program but i also need to make a menu for when the DVD is in the DVD Player but i went to photoshop to edit a photo but this happened and i have reinstalled it but nothing has changed. I have tried the Edit then Performance solution but that did nothing. So i need Answers As Soon As Possible!
    Thank You for your Time
    Kayy
    THIS NEEDS TO BE FIXED BY 20/2/12 or 23/2/12

    THANK YOU VERY MUCH FOR POSTING AND TRYING TO HELP
    I noticed yesterday it had something to do with the size (Length and Width) but still this is the correct answer!!!
    Thank You,
    Kayy

  • Macbook Pro get grey progress bar and shuts down

    Hello All,
    I have a macbook pro and I faced this issue out of nowhere. After shutting down the system last time, when I started the system, I could hear the apple chime, apple logo appeared with grey progress bar below it. The bar will progress to 1/3 or so and it will disappear and after few seconds laptop will shut down. I tried few times but same things was happening again and again.
    After going through few support forums, I booted by pressing D to run the Apple hardware test. It wouldn't do anything at all. Apple hardware test was stuck at pass number: 1 with elapsed time of 7 seconds. All retry were the same as the first one.
    I rebooted the laptop and pressed command + R and entered in  recovery mode/recovery disk. I clicked on Disk utility and select Macintosh HDD and started disk verification. I got hundreds of errors/warning, saying Missing thread recode (id = XXXXXXX) and it suggested to repair the disk. I tried to repair the disk but after similar message, pop window appeared with message that disk cant be repaired. I exited out of it and went back to recovery menu.
    I selected Reinstall OS X Mountain Lion and went through steps and at the point where I have to select my HDD, there was just one option and I couldn't select it. It gave message that This HDD is locked. I can't start in safe mode, and can't reinstall OS X
    I believe this is because of my hard drive might have crashed. can anyone help?
    Thank you,

    It does sound like your having mechanical or other issues with your boot drive.
    If your machine is under AppleCare or warranty you can take it to them.
    If you can user service your machine, you can opt to try to see if a new drive will work and install it yourself, or have a local geek do it for you.

Maybe you are looking for

  • System Copy - ABAP export using R/3 load -- RSCP ERROR: Altername NameTab

    Hi all, I am trying to export BW3.5  system using sapinst (R/3 load method). In the phase of executing export jobs , I am getting the error in SAPSSEXC.log  by mentioning it as altername too old. The log files are below. RSCP ERROR: Altername NameTab

  • How do  I use a variable from an Interface class?

    Right now I have three classes. First class is called Game and it extends my second class call Parent and also implements my third class call Source. Source is an interface class. I have a variable that I want to use in my Source class named Checker.

  • Final Cut Pro keeps crushing when I open it

    When I run Final Cut Pro it keep crashing and gives me this error message: Process: Final Cut Pro [221] Path: /Applications/Final Cut Pro.app/Contents/MacOS/Final Cut Pro Identifier: com.apple.FinalCut Version: 10.0.9 (231027) Build Info: ProEditor-2

  • Synchronization order of the Sync BO's

    Hi All, Can any body tell me where can we set the order for synchronization either in Middleware or in Client. We are having some problems with this order. We are working with standard MAM30 application. Here our scenario is we are creating time conf

  • Bluetooth authorization not working (bluez-simple-agent)

    Hello I'm trying to connect my Sony BD remote control to my laptop. Pairing and manual connect using hcitool works fine, but when my remote control initiates the connection,  my laptop seem to deny its connection requests. (See attached hcidump outpu