ProgressDialog background doesn't paint

I'm working on a Bridge script to copy files from my card reader into a directory structure based on EXIF data. It works (most of the time), but the progress dialog never repaints correctly, and sometimes the progress dialog and the Bridge window go completely white until the script is finished.
I'm using the progressDialog object from AdobeLibrary1.jsx. When it doesn't go white, the status text and progress bar are updated properly, but the window background is never painted. I've tried window.show() and document.refresh() with no effect. Is there something else I should try?
Thanks.
Henry

Henry,
This is one we have to live with for now. When bridge scripting is doing anyting intensive (such as copying files), there will be repaint problems. In the Import from Camera script, we flip up a warning dialog that this will happen.
Larry's idea was worth a try, but it didn't work for me. I've tried a bunch of other ideas as well without success.
One way that should work, is to use BridgeTalk. Have another application (Photoshop?) actually execute the copy, and send status messages back to bridge. We didn't opt for this in the Import from Camera script as it seemed too kludgy. Users might wonder why Photoshop is starting when all they wanted to do was copy some files.
If you want to try that - take a look at the BridgeTalkLongProcess Object in AdobeLibrary1.jsx. It allows you to execute a long running process in another app, and get progress reports back to bridge. It provides the progress dialog for you, and handles all of the messaging. All you need to do is put a function call:
sendBackStatus( progress, message )
in your target app script code. progress is an integer 1-100, message is what you'd like shown in the progress dialog. An example of how to use it is the Contact Sheet script.
Good Luck
Bob
Adobe WAS Scripting

Similar Messages

  • Bug: IconUIResource doesn't paint an animated ImageIcon

    I was recently playing with Icons and found that javax.swing.plaf.IconUIResource doesn't paint an ImageIcon that contains an animated GIF. Found the reason in these bug fixes.
    [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4215118]
    [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4215118]
    From that, I could arrive at a workaround: extend ImageIcon to implement the UIResource marker interface and use this class instead of wrapping an ImageIcon in a IconUIResource. Interestingly, NetBeans autocomplete revealed the existance of sun.swing.ImageIconUIResource which I determined to be a direct subclass of ImageIcon, with two constructors that take an Image and byte[] respectively.
    Test SSCCE: import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.swing.Icon;
    import javax.swing.ImageIcon;
    import javax.swing.JOptionPane;
    import javax.swing.UIManager;
    import javax.swing.plaf.IconUIResource;
    import javax.swing.plaf.UIResource;
    public class IconUIResourceBug {
      public static void main(String[] args) {
        try {
          URL imageURL = new URL("http://www.smiley-faces.org/smiley-faces/smiley-face-rabbit.gif");
          InputStream is = imageURL.openStream();
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          int n;
          byte[] data = new byte[1024];
          while ((n = is.read(data, 0, data.length)) != -1) {
            baos.write(data, 0, n);
          baos.flush();
          byte[] bytes = baos.toByteArray();
          ImageIcon imageIcon = new ImageIcon(bytes);
          Icon icon = new IconUIResource(imageIcon);
          UIManager.put("OptionPane.errorIcon", icon);
          JOptionPane.showMessageDialog(null, "javax.swing.plaf.IconUIResource", "Icon not shown",
                  JOptionPane.ERROR_MESSAGE);
          icon = new ImageIconUIResource(bytes);
          UIManager.put("OptionPane.errorIcon", icon);
          JOptionPane.showMessageDialog(null, "ImageIconUIResource", "Icon shown",
                  JOptionPane.ERROR_MESSAGE);
          icon = new sun.swing.ImageIconUIResource(bytes);
          UIManager.put("OptionPane.errorIcon", icon);
          JOptionPane.showMessageDialog(null, "sun.swing.ImageIconUIResource", "Icon shown",
                  JOptionPane.ERROR_MESSAGE);
        } catch (MalformedURLException ex) {
          ex.printStackTrace();
        } catch (IOException ex) {
          ex.printStackTrace();
    class ImageIconUIResource extends ImageIcon implements UIResource {
      public ImageIconUIResource(byte[] bytes) {
        super(bytes);
    }I can't see any alternative fix for the one carried out in response to the quoted bug reports, so have held off on making a bug report. Any ideas?
    Thanks for reading, Darryl
    I'm also posting this to JavaRanch for wider discussion, and shall post the link here as soon as possible. I'll also keep both threads updated with all significant suggestions received.
    edit [http://www.coderanch.com/t/498351/GUI/java/Bug-IconUIResource-doesn-paint-animated]
    Edited by: DarrylBurke

    Animated gif is working fine for me.
    You can check the delay time between the images in the gif, to see that it's not too short.
    Here's a simple example:import java.net.URL;
    import javax.imageio.ImageIO;
    import javax.imageio.stream.ImageInputStream;
    import javax.swing.ImageIcon;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import com.sun.imageio.plugins.gif.GIFImageMetadata;
    import com.sun.imageio.plugins.gif.GIFImageReader;
    public class AnimatedGifTest {
        public static void main(String[] args) {
            try {
                JFrame frame = new JFrame();
                frame.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE);
                URL url = new URL("http://www.gifanimations.com/action/SaveImage?path=/Image/Animations/Cartoons/~TS1176984655857/Bart_Simpson_2.gif");
                frame.add(new JLabel(new ImageIcon(url)));
                frame.pack();
                frame.setVisible(true);
                // Read the delay time for the first frame in the animated gif
                GIFImageReader reader = (GIFImageReader) ImageIO.getImageReadersByFormatName("GIF").next();
                ImageInputStream iis = ImageIO.createImageInputStream(url.openStream());
                reader.setInput(iis);
                GIFImageMetadata md = (GIFImageMetadata) reader.getImageMetadata(0);           
                System.out.println("Time Delay = " + md.delayTime);
                reader.dispose();
                iis.close();
            } catch (Exception e) {e.printStackTrace();}
    }

  • Custom color field in color selector for header background doesn't work

    Custom color field in color selector for header background doesn't work

    Hi,
    I'm unable to reproduce this issue. Are you able to apply a custom color elsewhere within the form?
    Regards,
    Brian

  • Sending mails in background doesn't work!!

    Hi,
    I have used FM SO_DOCUMENT_SEND_API1 for sending mails with attachment it works fine in foreground..but in background it doesn't seem to be sending mails....
    whats the way out?
    points for sure..
    Regards
    Gunjan

    Hello,
    Are you checking somewhere ths <b>SY-BATCH = 'X' or Initial.</b>
    Vasanth

  • Pdf creation - can it be set up so the background doesn't print, and text defaults to black?

    Hi, I am creating a portfolio with a black background and white text. I am anticipating that most of the time it will just be viewed on screen, but in-case it gets printed, I want to know if there is a way that you can change the print view so that the background is not printable, and any text defaults to black. I have noticed when printing web pages this often happens, but not sure if it's possible through InDesign.
    Any replies gratefully appreciated.
    Karen

    Here is a way that this can be done: Convert the background into a button, this will allow you to set the background to be visible in PDF, but doesn't print. Note: with the button selected, you can access the visibility options from the flyout menu of the button panel. Copy the frame containing the reverse text and convert it to a button and apply the same visibility (visible in PDF, but doesn't print). Paste text in same position, make it black and send it to back (or create a layer behind everything and place text here). The black text does not have to be a button. When you export, make sure to have interactive elements selected. In PDF, background and reverse type will be viewable, but allowing the black text to print.

  • Desktop background doesn't show up

    I have a new Mini with 2GHz Core 2 Due, 2G RAM, and 320G HD. I use it as a headless (no keyboard, mouse, or monitor) music server running iTunes. I control it through VNC client (I tried both JollysFastVNC and Chicken of the VNC). Screen resolution is set at 1024x768. The problem is that the Desktop background picture never showed in the VNC client window, no matter what picture I chose. More importantly, Cover Flow in iTunes doesn't show either; the top half of the Cover Flow window is always blank but the bottom half works fine. List and Grid view work without problem, however.
    I really don't know what is the right forum to post this so I just start here. Does anyone have any idea on the cause and how to fix it?
    Thanks in advance for all the helps.

    Hmm, dunno what to tell you then. I've got an older Mini running headless and have controlled it with Chicken of the VNC and with Leopard's screen sharing. Both work fine (though I've never tried iTunes' cover flow with it... it's not a media server, it's being run as a calendar and FileMaker server). So I suspect you may have some odd, subtle system problem.

  • Changing my finder background doesn't work

    When I try to change my background options, it doesn't allow me too, any solutions so that I can make it possible to change my finder background?

    Hi,
    You mean doing this in iCon View ?
    It can of course be a colour
    As has been said it does not translate to the other views or to Search results (which is what "all my Files" is).
    EDIT
    Also the pic does not "tile" and has to be very big if you are going to want it as the background during a Scroll.
    9:38 pm      Sunday; June 29, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • JPanel doesn't paint graphics

    Hi ! I've been writing a program that should graph a linear function, the problem is that I'm trying to draw a line in a JPanel but this doesn't work XD...The program has 2 windows. The first one is the windows from where i get data for the function, after having the data I press a button that I want to open a new window and draw the function...
    This is the part of the code in the button on the first window that certainly opens a new window
    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
       JFrame frm_grafica = new JFrame("Grafica - B-Rabbit");
       frm_grafica.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
       Grafica graph = new Grafica();   
       frm_grafica.getContentPane().add(graph);
       frm_grafica.setSize(250,250);
       frm_grafica.setLocation(this.getLocation().x+this.getWidth()+5, this.getLocation().y);
       frm_grafica.setVisible(true);
    }but in the new window [that is located beside the first window] this is the code, that doesn't work...yes maybe there's something i don't do or something that i am passing over..
    public class Grafica extends JPanel{
        Grafica(){
            this.setBackground(Color.WHITE);
        protected void PaintComponent(Graphics g){
            super.paint(g);
            g.setColor(Color.BLACK);
            g.drawLine(50,50, 20, 20);
    }So Hope someone helps me...

    //protected void PaintComponent(Graphics g){
    protected void paintComponent(Graphics g){//<-- it's 2.00am, small p
            //super.paint(g);
            super.paintComponent(g);

  • Menu background doesn't go to edge

    I used Photoshop to create a background image to use for a menu background but it doesn't fill the entire area in DVDSP. I know that sounds a bit odd so let me explain...
    1) Made 1920x1080 image in photoshop
    2) Saved as an unlayered tif
    3) Drag-n-Drop the tif onto the menu background of DVDSP and set it as the background
    4) The DVDSP project is a 16x9 SD DVD (so I'm assuming there is some pixel aspect ratio conversion going on here and resolution change).
    When I look at the menu, there is a dark grey stripe along the left and right edges of the menu. I tried different formats but that didn't help anything. Any ideas on how to get the image to "fill" the entire background of the menu? Thanks!

    I would definitely use the preset in Photoshop if I were you - are you using CS?
    Set it to be D1/DV Widescreen for whatever video format you use (I choose PAL 1.4) and you should be good to go.
    If you try to recreate this yourself, DVDSP will scale the image to fit the dimensions and you may find it doesn't fit exactly.
    Failing that, use a 720x480 or 720x576 image and set the menu to be 16:9, but check out the distortion it produces.
    As Drew said - read the manual... the correct dimensions and way to approach this are all in there.

  • Desktop Background doesn't show adjustments

    I adjusted an image, sharpened, straightened etc. Went into system preferences to use it as my desktop background, found the correct image but the adjustments weren't portrayed in the background.
    I have aperture set to share previews etc but it doesn't change anything. I have to export the image in order to use it as the background.
    Any help is appreciated.

    Did you try *Photos->Update Preview* ?

  • Nokia lumia 630 background doesn't change

    hello,
    i have a problem.
    i trie to change the background of my nokia 630 lumia.
    i did all the steps exactly like told on the website from nokia but it never changes.
    the only thing that i can change is the background from black to white
    can somebody help me?
    Solved!
    Go to Solution.

    The set background image will only show through transparent tiles, the space between tiles is not transparent.
    So, you  are not doing anything wrong and this works as it should.
    Click on the blue Star Icon below if my advice has helped you or press the 'Accept As Solution' link if I solved your problem..

  • Project background doesn't align with stage after rescaling project

    Hello,
    I think I discovered a bug that may or may not have been resolved in later versions of Captivate. I'm using Captivate 5 (5.0.3.631) and as much as I'd like to have a newer version, my employer only has this version purchased right now. I'm posting this here because I realize this may not be a bug and there may be a workaround, in which case maybe I can learn something!
    The issue appeared when I recently had to rescale my project to make room for a closed captions popup area at the bottom of the stage. (I don't want it to overlap previously positioned content.) Do do this, I rescaled my project to be 25 pixels taller than it was previously, and I selected the resize option to keep the already placed project contents aligned at the top left of the project rather than to scale everything to fit. Just as I hoped, this extended the stage out from the bottom by 25 pixels, much like resizing a canvas property in photoshop.
    I then edited my project background images to match the new project stage dimensions in order to cover up the now visible 25-pixel-tall strip of uncovered stage. I imported the new background image onto my master slide in the same way I placed the original one, and this is where the problem appears. The taller image, configured as a "project background", will not align with the stage anymore. Instead, it's hanging off the top of the stage by 13 pixels and not reaching the bottom of the stage by 12 pixels (adding up to the 25 pixels I increased the project height). I purposefully placed the image as a project background rather than just dragging it on the stage of the master slide. My reasons for doing so are somewhat complicated, but mainly are because I need the master slide background to not interfere with the Z-order of items on the regular slides. Apparently a master slide image on the stage of a master slide will cover up items set to display for the rest of the project. Perhaps this is a bug, too?
    Anyway, back to the problem at hand... I had everything working fine before I rescaled my project, but now the imported background image won't align with the stage. Because it's set as a project background, there is no way to reposition it on the stage... it just kind of lands where it lands. It appears that when I rescaled the project, Captivate remembered where the center of the "old" sized project was and didn't recalculate the center of the "new" rescaled project. So, when I place a larger image in the master slide (as a project background), it is centering it where the old, smaller project used to be... thus resulting in the larger image to not be centered on the stage.
    I figured out a workaround in the mean time by placing the background image on the stage of the master slide (not as aproject background), and by moving more things to the master slide that I don't want to be covered up. This actually seems to be a more elegant solution that what I had previously, but I'd still like to know if what I'm experiencing is a bug or not.

    Ok just found a workaround/solution.
    (always happens right after I ask, for some reason).
    Rescaled my project but kept the size and positions the "same and centered".
    Then I replaced all my background images with bigger versions (previously I had cropped them at the right and bottom).
    Now my backgrounds were all great, but all my objects were too low.
    All I had to do was ctrl+A to select everything on a slide, and then change the Y value for the whole bunch to zero.
    This magically placed all objects in their correct respective spots.
    Hope that helps someone out!
    Russ

  • Replenishment run in background doesn't pick up some articles

    Hi All,
    We have set the replenishment run (WRP1) in background and in the variant parameter, we have selected few RP types. There are few articles which are not picked up by the background job for creating PO. But when I remove the RP types from the variant, it picks up the articles to create POs. Do you know why this happens?
    Thanks,
    Rana
    The articles have the RP types in Logistics Stores view which are set in the variant.
    Edited by: Rana Dutta on Jul 20, 2009 6:14 AM

    Opened a new thread

  • JLabel background color wont paint in JLayerPane

    I tried to use JLayeredPane to display some color label by setting a background color for the label. However, label's background never appear on the screen. I couldn't fix it. Please help!!

    Try yourLabel.setOpaque(true).
    Shaun

  • Background doesn't stay put

    Hi,
    I was wondering if there's someone out there who could help me figure out why when scrolling in this website, I get a white block at the bottom, instead of the content moving over the image?
    http://www.illumino-lysuppworld.com/aktuellt.php
    I would really appreciate all and any help!
    Cheers,
    Natalia

    Because you are not repeating the image.  Your css for the body should contain this:
    background: #FFF url(../imgs/web/background.png) repeat-y top center;
    But you have:
    background: #FFF url(../imgs/web/background.png) no-repeat top center;
    This is in file main.css
    Please change this and then come back to tell us if this is what you want. 
    I don't normally understand questions first time round!
    hth

Maybe you are looking for