How to Minimize Window Dialog

I'm creating a dialog window for PS CS6. Is there any way to minimize the window and then do some work in photoshop, once that gets completed bring back the same minimized window (other way round maximize window) when the user presses a predefined keys ? Is this possible ?
app.preferences.rulerUnits = Units.PIXELS;
var guides=app.activeDocument.guides;
var win = new Window ('dialog', 'Dialog Name');
win.grpButtons = win.add('group');
win.grpButtons.orientation='column'
win.grpButtons.alignChildren = 'fill';
win.grpButtons.pnl1 = win.grpButtons.add('button', undefined, 'Step1');
win.grpButtons.pnl2 = win.grpButtons.add('button', undefined, 'Step2');
win.grpButtons.pnl3 = win.grpButtons.add('button', undefined, 'Step3');
win.grpButtons.pnl4 = win.grpButtons.add ('statictext', undefined, 'Click on the steps to proceed');
win.size = {width: 240, height: 150}
var result = win.show();
win.grpButtons.pnl1.onClick=function(){
var result1 = win.minimize();
app.bringToFront();

bala281972 wrote:
That's cool JJ. Any suggestion on how to transfer control from JS to PS and bring it back please ?
I  do not know if that can be done.  The would be more like having two scripts   Script 1 then user use Photoshop then Script 2.
However you can make script interactive like actions can have interactive steps.    You can prompt user for information and you can make interactive steps.  For example you can open a files selection dialog when the user can navigate to the file(s) that they want to script to process.  If the user selects a file(s) the script will get a file or file list or a cancel or no no selection.  The script can the do what would be appropriate.
For example say you want to help a user populate a collage template psd interactively in the script you could highlight the image areas to be populated then open a file selection dialog that would allow the user to select one image file of supported image file types. If the user select a file the script could place in the image. Size the place image smart object to fill the image area, Position the image layer over the area and mask off any excess. Then the script  put the user into an interactive transform layer dialog where the user can tweak or accept the image composition within the masked area. tweak the virtual image crop change the image composition and scale. Once the user commits the transform the script would move on the the next image placement.

Similar Messages

  • How to minimize window into the system tray icon

    Hi,
    I tried to fin how to minimize the application main window into the right down corner (system tray bar) only as an icon cause I don't want to have it on main bar.
    Thx for any ideas.
    Wenca

    I've already done that, some years ago.
    Sorry, but I cannot give you the code, cause it has vanished after a few (!!!) system re-installations ;)
    But this was the main idea:
    - make a jni-dll
    - inside the dll, get the handle to the window you want to minimize
    - alter that window's properties
    It's rather easy, once you've avoided all pitfalls. I'll suggest http://www.codeproject.com , they've certainly some tutorials on minimizing to the system tray.

  • How to minimize a window and open another app

    How to minimize window and open another app

    There is no "minimize". You can bring up the recent applications by double tapping the Home button. A single tap of the Home button will take you back to the Home screen.

  • How can I supress a Windows dialog box programmatically in LabView?

    I am trying to automatically supress or close a windows dialog box that appears when a LabView program crashes. I have a restart program that will automatically reopen the program and I don't want to have to click on the program error window that results from the crash. Does anyone know how to do this?
    Thanks so much for your time!

    The program rarely crashes - it is running in the background for the entire day and we just want to ensure that it is monitored and restarted in case of a crash. We also don't want the user to be bothered with the program error messagebox that pops up saying that an error log is being created. The program crashes when too many programs are running at the same time - so the problem isn't a huge one. I was just wondering if it was possible to stop this program error message from appearing by programmatically selecting the okay button or by suppressing the message entirely?

  • How to avoid the windows "dialog box" when we use flexprintjob class

    in the print segment
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf65381-7ffc.html
    it says
       printJob.start();
    This causes the operating system to display a Print dialog box.
    this  windows "dialog box" which is used to set the page size, page index, or some other page settings.
    but in my case , i can't let user see this dialog box.
        how can i avoid this "dialog box" when i call   printJob.start();
    it is my big issue ,please help to give a suggestion

      hi   how can i set the "ie" "internet explorer"  to avoid the "dialog box."  if i have to do it .
    thank you very much !

  • I have a blackout covering the red X and minimize window in upper right corner. How do I get rid of it?

    Windows performed an update yesterday and now I have a shield in the corner of my Foxfire icon and I have a blackout over the red X and minimize window in the upper right corner when I sign on to Foxfire. How do I get rid of it?

    The large "X" means that the image is still marked as hidden, but as you see the hidden photos, you now have turned on "hidden Photos" in the "View" menu of the main menu bar.
    To remove the "Hidden" mark, select the image in the event and use the command "Photos > Unhide Photo ⌘L"
    Regards
    Léonie

  • HT1589 This doesn't work in Windows 8. Anybody know how to get this dialog box in Windows 8?

    This doesn't work in Windows 8. Anybody know how to get this dialog box in Windows 8?

    Hello,
    Try disabling graphics hardware acceleration. Since this feature was added to Firefox, it has gradually improved, but there still are a few glitches.
    You might need to restart Firefox in order for this to take effect, so save all work first (e.g., mail you are composing, online documents you're editing, etc.).
    Then perform these steps:
    *Click the orange Firefox button at the top left, then select the "Options" button, or, if there is no Firefox button at the top, go to Tools > Options.
    *In the Firefox options window click the ''Advanced'' tab, then select "General".
    *In the settings list, you should find the ''Use hardware acceleration when available'' checkbox. Uncheck this checkbox.
    *Now, restart Firefox and see if the problems persist.
    Additionally, please check for updates for your graphics driver by following the steps mentioned in the following Knowledge base articles:
    * [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]
    * [[Upgrade your graphics drivers to use hardware acceleration and WebGL]]
    Did this fix your problems? Please report back to us!
    Thank you.

  • How do I restore my iPhoto. When I open i get a window dialog "Your iphoto library is either in use by another application or has become unreadable shut down and restart your computer. If problem persists, try rebuilding your iphoto library. To do th

    When I try to open iPhoto I get a window dialog that says...
    Your photo library is either in use by another application or has become unreadable
    Shut down and restart your computer, and then open iPhoto again. If the problem persists, try rebuilding your photo library. To do this, quit iPhoto, and then reopen it while keeping the Option and Command keys pressed. You can also try restoring your photo library from a backup.
    I have tried the reopen it while keeping the Option and Command keyes pressed.
    No change.
    I dee nothing but a blank page,
    Any help would be appreciated.
    Also hace back ups of all images on cd's. dvds and jump drives.
    Any advice is appreciated.

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • LV memory leak - How to use windows API SetProcessWorkingSetSize (from Kernel32.dll)

    Hi fellow LV'ers
    Okay - this is a bit tricky, but i'll try and explain the problem, then ask for the solution, because it may be that someone knows a better way to deal with this.. might get a bit long, sorry - if a solution comes up this will enable all of us to make more memory efficient LV code so please read on..
    Here is the deal:
    When building even a very simple LV executable, looking at the windows task manager will yield a rather large amount of memory allocated for such a small program - and the only way to free this up is by physically clicking the windows minimize button, then suddenly the amount drops to only a few MB and upon maximizing the window again the memory consumption will increase somewhat again, but for a simple VI build to an exe this move may change the consumption from +70MB to less than 15 MB.. This is irregardless of the code you put in the VI, so no coding example in this post as it is how LV works - you can even test it with the development environment - look at the task mgr and check LabVIEW's memory consumption, minimze ALL open NI windows incl project explorer etc, and you will see a significant decrease in memory usage even after maximizing again.. This has annoyed me since day one, but since RAM is a near zero cost these days it is not something I stay awake at night to think about.. However - I have moved into the "publish to web" tools now, wanting to do a remote monitoring part for my application for my customers to experience increased usability from the software i sell them..
    All is well, publishing is really easy (i use the monitor function, NOT the embeded, as customers need not have Labview RunTimeEngine installed, because they might look at it from a non RTE supported platform such as a mobilephone web browser)
    Everything is working fine also for the build application. However - I have noticed that once users start to remote monitor the running application - memory consumption of the running LV application starts to increase - and it keeps doing so - to such an extend that you can drain the computer complete and run off the cliff with a windows error... This is off course not very productive for me, being specialized in measurement applications that usually runs for a long period of time - I initially thought that I had done some poor programming in the VI used to display on the webpage - but it turns out that I can reproduce this behaviour with a simple boolean on an empty front panel..
    NI support has been informed, and they admit there is a problem, but so far solutions from them has been a bit too exotic for my taste, and thus I'm seeking the help of fellow LV programmers...
    You see - The method to solve the increasing memory consumption, is the exact same as mentioned above..minimize the application running with the "minimize" button and all memory will be freed, as soon as you maximize the application and users are viewing it remotely, the memory usage raises again, and history repeats... As previously mentioned, minimizing the window via normal LV calls to property nodes does not yield the same result, nor does a request deallocation of a VI(When you profile a project, there are no VI's increasing in memory, it is the LV process it self doing it) 
    After many many hours googling I stumbled upon this:
    http://support.microsoft.com/?kbid=293215
    I believe trimming the process with SetProcessWorkingSetSize would solve this problem, and now I would really like to be able to do this in my program, so that users are not forced to minimize the program every X hour depending on their system size...
    However - I have absolutely NO experience in calling windows API from LV, i need someone with that knowledge to provide an example of how to call this.. I've looked at examples on how to do calls to windows API - there is an example in this forum with some llb's in it, and I have gained a fair understanding of how parameters are passed between the calls, but none of those include the "hProcess" handle that is apparently needed for this specific winAPI call to work - Anyone in this forum with the knowledge on how to obtain this handle from a VI, if at all possible, and could provide an example VI for me to use - or even better , someone with the knowledge of how to do this within LV it self??
    Your help is much appreciated
    Best Regards
    Jacob
    LV8.6.1 patch something
    Win XP 
    Solved!
    Go to Solution.

    Hi Enrico
    Finally I can give something to the community that has given me so much  :-)
    The "official" statement is that "yes we know it is a problem".. Not sure what that will do to the future.. 
    I have the problem on 8.6.1 as well  - and in fact it is a general LV problem, that I first time reported to NI with LV8.2 as I was pissed by the fact that even the smallest exe file would consume + 50MB of memory until you manually minimized the window. Well - thanks to the feedback from Cosmin I seem to have solved the problem.
    I most warn that having started to "empty process" once in a while has led to occasional program crashes in the lethal "app.exe performed an illegal action and is closed" windows dialog - however what I did was to move the webserver to a seperate exe file and then communicate the data that I want to use via datasocket in a cluster.. It works like a charm and I simply stall the single thread that the webserver is running when ever the empty process is called and I have not seen a crash since then.. (the initial implementation was done in the main app with 4 parallel loops running, and I guess that was a disaster waiting to happen)
    Either way - what I have done is made a VI that at a user defined interval calls the empty process, simply by getting the .exe name from the task manager of the calling program - it is simple and very effective. I call it every 5 minutes - needless to say that flushing too often will most likely kill performance of the system. I have not noticed problems with VM - are you sure you are not storing large arrays or moving around copies of data not used frequently?
    For future reference to this forum, it is attached here including the .dll required to call - it is a LV8.6.1 file as I have not had the time to yet again test every single function of my program for new problems that could occur with upgrading to LV2009 
    I hope this solves your problem..
    best regards
    Jacob
    www.10EaZy.com 
    Attachments:
    EmptyProcess.zip ‏32 KB

  • How to make window size same as linked file?

    Hi
    I understand how to make the link and have it open in a new
    window upon click, but how do I make this map open in a window that
    is exactly the same dimensions as the map png file itself, as
    opposed to opening in the same size of the browser window.
    http://www.enhancedwireless.net/Company/contact.shtml
    and click on the MALAYSIAN driving directions.
    Thanks
    KB

    That works fine and is quite acceptible, but it won't work
    for the initial
    default page - which is what the question is about.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "818g" <[email protected]> wrote in message
    news:egm8m5$gd5$[email protected]..
    > I'd do it with javascript. Highlight the link text in
    Dw, type
    > "javascript:;"
    > in the link box, hit enter, open the Behaviors panel,
    click on the Add
    > behavior
    > button (plus sign) and choose "Open Browser Window" from
    the menu. In the
    > Open
    > Browser Window dialog box you can define the width anf
    height of the
    > window.
    >

  • How to minimize Final Cut pro with one click?

    I know you can minimize windows (canvas, timeline, etc) by pressing Command+M 4 times but how to minimize Final Cut pro with one click?

    Hold down the Option key and click the Minimize button on any window, all windows in the app will minimize.
    Don't know what or if the reverse of this is - so although it's a one click minimize all windows, I believe you have to re-enlarge them one at a time.
    MtD

  • How to run a dialog's method from a button's event handler?

    I've created my first dialog from the samples, but I am having trouble figuring out how to run a method in my dialog from an button's event handler. Can anyone please point me in the right direction?
    function CreateDialog() 
        this.windowRef = null;
    CreateDialog.prototype.run = function()
        //...declare a bunch of vars
        // Create a window of type palette.
        var win = new Window("dialog", "Element Spray Generator",[iTop,iLeft,iTop + iWidth,iLeft + iHeight] );  // bounds = [left, top, right, bottom] 
        this.windowRef = win;
        // Add a frame for the contents.   
        win.btnPanel = win.add("panel", [iPadding,iPadding,iWidth-iPadding,iHeight-iPadding], "");
        .... add a bunch of other stuff ...
        win.btnAdd = win.btnPanel.add("button", [win.btnRemove.bounds.left - iPadding - iButtonWidth,win.lstImages.bounds.bottom + iSmPadding,win.btnRemove.bounds.left - iPadding,win.lstImages.bounds.bottom + iSmPadding +iTextHeight], "Add");
        win.btnAdd.onClick = function() {
           //todo implement this
           var f = File.openDialog("Open File") ;
           win.lstImages.add("item", f.displayName );
           this.EnableControls();    //<--- problem is on this line here!!
        this.EnableControls();  //<--- this works
        // Display the window
        win.show();
        return true;      
    CreateDialog.prototype.EnableControls = function (){
        var result = true;
        result = result && (this.windowRef.ddlPaths.selection != "");
        result = result && (this.windowRef.lstImages.items.length > 0);
        this.windowRef.btnOK.enabled = result;

    This may not be the reason, but when using the way I create dialogs 'this' inside of an onClick points to the control.
        win.btnAdd.onClick = function() {
           //todo implement this
           var f = File.openDialog("Open File") ;
           win.lstImages.add("item", f.displayName );
           this.EnableControls();    //<--- I would expect it to call another function of btnAdd
                                            // this.parent.EnableControls() might be what you want if the control is not in some other container

  • How to stop the Dialog from being dragged

    I was hoping that someone could tell me when calling a Dialog from Jframe, a how to stop the Dialog from being dragged
    while a dialog is showing.
    When it is visible I can still click and drag the Dialog
    I want to set it so you can not drag it until the dialog has be closed.

    If you don't have access to the parent frame, a "hack" that usually works:
    Frame frame = Frame.getFrames()[0];
    if (null != frame && frame instanceof JFrame){
    JFrame jf = (JFrame)frame;
    JDialog jd = new JDialog(jf, "title");
    ... code here ...
    As each JFrame (or Frame) is opened, its stored in the array of Frames that you can get. Same thing with Dialog.getDialogs(). Almost always, at least so far for me I've never had this problem, the [0] index is the main window opened, or the parent/top frame. I'd put the check in there to be safe and make sure its a JFrame and usually you'll only have the one JFrame.

  • How to minimize Client-Server Round-trip in ADF Faces application ?

    Hi All,
    We have just finished POC on our prototype of ADF Faces + ADF BC application. The POC Emphasizes on Bandwidth requirement.
    After receing the result from the communication provider, including : TCP packets send, Bytes sent from/to server and number of Client-Server Round-Trip.
    There are several part of the application that Must be tuned for the application to run on acceptable performance.
    Here is some page/ function that should be tuned :
    - First page, ADF Read Only Table with two images and some buttons, cause 5 round-trip
    - ADF Dialog Returning Value (as LOV), cause 4 Round-trips
    - On ADF Form, press Commit button, cause 3 Round-trips.
    So the question is :
    1) How to reduce round-trips on ADF Faces application ?
    2) How to minimize the bytes send from / To server on a specific user action ?
    Please give me some recommendation..
    Thank you very much,
    xtanto

    Hi Frank and Steve,
    Thank you for your reply.
    Yes Frank, what I mean by Round-Trip is the traffic between Client and the Server. And Yes, we will use VSAT where the latency is 1 - 1.5 second, so that round-trip matters significantly.
    What I will do is :
    - use minimal skin and No image at all
    - don't use Dialog for LOV because it requires AutoSubmit there.
    - Use 'Apply-Changes' button to do server-side validation before Commit.
    Then do the POC / testing again.
    Thank you,
    xtanto

  • How to call GUI/Dialog in Acrobat sdk Plugin

    How to call GUI/Dialog in Acrobat sdk Plugin using VC++ here is my code
    ACCB1 void ACCB2 MyPluginCommand(void *clientData)
      HMODULE hAppInst = GetModuleHandle(NULL);
      DialogBox(hAppInst, MAKEINTRESOURCE(IDD_DIALOG1), NULL, NULL);
      HWND hWnd = ::CreateDialog(hAppInst, MAKEINTRESOURCE(IDD_DIALOG1), NULL, DlgProc);
      ::ShowWindow(hWnd, SW_SHOW);

    You can, with care, use Windows API calls in a plug-in. But you have to understand the process of loading resources. In particular, the calls you use try to load resources that belong to the main executable, which is Acrobat.exe. Plug-ins have their own instance handle, which is conveniently stored in gHINSTANCE. 
    In certain cases, especially modeless dialogs, there may be extra calls to make things work properly.
    You do need to know how to use the Windows API, and your sample lines seem confused, unless you intended to first display a modal dialog then open the same dialog as modeless. That's something for another forum,

Maybe you are looking for

  • Is Active Directory's ExtensionAttributes9 a field in user object and how to retrieve it in the class type userprincipal?

    Hi, I'm using VS2012. I want to use this ExtensionAttributes9 field to store date value for each user object.  I use UserPrincipal class, a collection of these objects are then bind to a gridview control.  Is ExtensionAttributes9 a field in AD user o

  • How to do a manual backup of Time Machine.

    Hi, i am kind of new to Macs however i have lots of experience on PC and DOS. I am being asked to make a back up of around 10 External harddrives that were used by Time Machine to back up a user Mac. However this is the twist. I am being asked to to

  • Intel mini with crt

    when connected to a crt monitor, does it give murky/blurry image or pale colors like the g4 mini did?

  • What brand of cdrs work in your superdrive?

    I have a Matshita DVD-R UJ-845 and so far haven't been able to get it to burn any cdrs. I've tried memorex and maxell so far but I get the errors that you'll find in discussion here... Topic: A CD burning problem... It would be nice to have a list of

  • DI Administrator not show job log content

    Post Author: ineta.lapina CA Forum: Data Integration Hello! We have installed BO Data Integrator 11.7 and also DI Management console. In Administrator we always loking in logs how jobs was processed, but after Job server removing and new adding, I ca