Modeless window using "palette" does not stay up in CS5

I am having trouble running a modeless dialog with CS5 (on Windows 64-bit).  My own script does not stay up and neither does the SnpCreateDialog.jsx snippet that  comes with the ESTK and is supposed to demonstrate modeless dialogs.  I have  tried:
Running from the Scripts panel
Add #target photoshop
Being sure the drop-down menu says Photoshop, not CTSK
as suggested in an older discussion at http://forums.adobe.com/message/3008230#3008230.  (I decided to make a new discussion as that one was marked answered.)
It also does not stay up when moved into the Photoshop Scripts folder and run from the File menu in Photoshop.
The relevant code in SnpCreateDialog.jsx is:
function SnpCreateDialog()
     this.windowRef = null;
Functional part of this snippet.
Create a window of type "palette" (a modeless dialog) and display it.
@return True if the snippet ran as expected, false otherwise.
@type Boolean
SnpCreateDialog.prototype.run = function()
     // Create a window of type palette.
     var win = new Window("palette", "SnpCreateDialog",[100,100,380,245]);  // bounds = [left, top, right, bottom]
     this.windowRef = win;
     // Add a frame for the contents.
     win.btnPanel = win.add("panel", [25,15,255,130], "SnpCreateDialog");
     // Add the components, two buttons
     win.btnPanel.okBtn = win.btnPanel.add("button", [15,65,105,85], "OK");
     win.btnPanel.cancelBtn = win.btnPanel.add("button", [120, 65, 210, 85], "Cancel");
     // Register event listeners that define the button behavior
     win.btnPanel.okBtn.onClick = function() {
          $.writeln("OK pressed");
          win.close();
     win.btnPanel.cancelBtn.onClick = function() {
          $.writeln("Cancel pressed");
          win.close();
     // Display the window
     win.show();
     return true;
"main program": construct an anonymous instance and run it
  as long as we are not unit-testing this snippet.
if(typeof(SnpCreateDialog_unitTest) == "undefined") {
    new SnpCreateDialog().run();
If  I put a breakpoint on the "return true;" line, then I can see that the dialog has, in fact, been created and is visible, but it has returned from win.show() and will go away as soon as the script continues.
Any help would be appreciated.

Kenneth Evans wrote:
The advantage of a modeless dialog is that you can continue to do things in Photoshop while the dialog is up.  At least I presume so, since I haven't got one to work, including the ESTK example.
Sorry but no, most of the Photoshop UI is disabled while a script is running even if the script displays a palette window.
A dialog window does wait for show() to complete. That is what makes dialogs modal. A palette window does not wait for show() to complete. It runs the rest of the script.
In the example you posted all the script does after showing the window is return true then ends. Which is why all it does is flash the window. If you put a $.sleep(1000) line before the return true line the windows will display until sleep timeouts then the script will end and the window will close. That is why with Photoshop palette windows are really only useful for progress bars or other script status type windows.
Although palette windows may allow the user to intreact with the app UI while the window is displayed that doesn't work with Photoshop. The window only displays while the script is running and a running script limits Photoshop UI interaction.
I have tested palette windows in CS2, CS3, CS4, and CS5 with the same results. The window only shows while the script is running.
With Photoshop if you want the user to interact with the UI you have to create a panel.

Similar Messages

  • Export sorted photos. Does not stay in arranged sequence. Lightroom 4 4.2 Windows 7.

    Trying to export 199 photos. Sorted in a collection. Tried to save and export collection. Also tried to save as a folder.
    When exported does not stay in arranged sequence. Have searched previous questions and watched a bunch of training videos.
    Trying to learn to use Lightroom 4. Complicated for a beginner. Appreciate all help.
    Thanks xbaker

    Hi,
    the order of your arangement can only be exported, when you rename your files on export, see screenshot. Notice, that the images not in alphatetical order.

  • Been using LR since 2004. My raws are all of sudden jumping around in Develop module. Image does not stay, it goes forward and backwards randomly, even with magic mouse off. Can't edit. Using MacPro, currently everything. Canon 5dmk3 raws

    Been using LR since 2004. My raws are all of sudden jumping around in Develop module. Image does not stay, it goes forward and backwards randomly, even with magic mouse off. Can't edit. Using MacPro, currently everything. Canon 5dmk3 raws

    This sounds like a hardware issue. I haven't seen this particular problem reported before.

  • Control does not stay in case structure while using motion VIs

    Hi,
    I have a motion control card PCI 7344 connected to my PC. I am able to control the motor at the required speed till the required position using an encoder. Now I have put my motion control VIs in a case structure in such a way that, if Case1 is selected then the motor should to position P at speed S, if case 2 is selected then the motor should move to position Q at speed S and if case3 is selected then the motor should to position R at speed S. I am selecting cases 1,2,3 etc. by scanning a set of numbers seperated by spaces which look like this,
    1 2 5 7 3
    This number scanning is done using a while loop. Now, when the first number is scanned in the above set of numbers. The number 1 is obtained and the control is switched to case1. But before the motor reaches position P, the control switches to case2 and before completing the execution, the program scans case5 and so on. That means that the control does not stay till the move in the case 1 is completed. I'm sure there must be a way to retain the control to a case and stop the next number to be scanned before the functions in the particular are completely executed. I thought of one method, i.e. by using the move complete VI provided in LabVIEW, but I could not implement it. Please help me out with this.
    Regards,
    Giridhar Rajan
    Automation Engineer,
    Cruiser Controls,
    Mumbai, India

    Hi,
    Our motion controllers allow you to preemptively start a move in the middle of a current move.  For example if you are moving from point A to B and based on some logic, you determine you need to immediately start moving to point C.  A preemptive move allows you to just load the new target position and call start.  You do NOT have to first stop the current move and then start the new move.
    In your case, you want the first move to complete before the second move starts.  There are two ways to handle this.  First, wait for the move to complete via a Wait For Move Complete function/VI call, or use the Check For Move Complete function/VI in a loop.  Second, use Blend Start instead of the regular start.  A Blend Start (if blend factor is set to 0) waits for the first move to complete before the second move starts. 
    Check out the help topics for Start Motion and Blend Motion to learn more.
    Thanks,
    Rodger S.

  • Windows 8.1 does not go to sleep reliably anymore

    I recently did a clean install of Windows 8.1 Pro x64 (final version). Before doing the clean install, all hardware being identical, my Windows 8 was ran smoothly and went to sleep fine automatically after the set time.
    Now, after the clean install, although I believe I have installed and set up everything as before, the computer does not reach standby automatically anymore most of the time. To be precise, when I reboot or log off and on the PC, the sleep functionality
    is re-established for a while, but after 1 or 2 hours of work it invariably gets lost.
    However, as soon as I disable the Ethernet adapter, the PC sleeps as expected.
    I do not seem to be able to figure out why this is, or how my configuration is different than before.
    Here are a few specs about my hardware: ASRock Z77E-ITX mainboard (http://www.asrock.com/mb/Intel/Z77E-ITX/, has the Windows 8.1 compatibility sticker), Intel Core i7-3770, 4x 3.40GHz including Intel HD 4000 integrated graphics (no external graphics installed),
    Intel 530 Series SSD, Intel 520 Series SSD, WD HDD. I have use a wired Ethernet connection, my Ethernet chip is from Broadcom. Wifi chip is disabled.
    Since this has been a pervasive issue with all Windows versions, the internet is full of suggestions how to resolve this matter. Why I am not convinced that the old advice still has any bearing as I tend to think Windows 8.1 introduced new issues (bugs?),
    for the sake of covering all bases, I tried almost every tip I could find on the net and will list my fruitless attempts in the following. It might also be useful as reference for other people trying to tackle such issues.
    1) Installed latest Windows 8.1 drivers from Asrock's homepage. I also tried chip manufacturer's like Intel's own drivers, did not make any difference (so far).
    2) Left the homegroup and disabled homegroup functionality as for example in these threads it has been argued that this is a new issue with Windows 8.1: http://www.eightforums.com/general-support/28226-windows-8-1-refuses-sleep-2.html
    http://www.eightforums.com/general-support/33221-windows-8-1-does-not-go-sleep-standby-automatically.html
    3) In the Ethernet adapter's settings, I unchecked ipv6. I also made sure the device cannot be awaken through the network.
    4) I even went so far to disable network discovery as
    file and printer sharing (both in private and public profiles) and disable
    public folders.
    5) Even though sharing is disabled, I also made sure that within the energy options the computer is
    allowed to sleep when sharing media.
    6) powercfg /requests returns "none".
    7) ran powercfg /energy duration 300 from an elevated command prompt while the ethernet adapter was enabled. It found 9 errors, mostly related to USB hubs, but the same errors were also recorded when I repeated the exercise having the ethernet
    adapter disabled. So these errors are probably not relevant for the problem at hand.
    8) powercfg /devicequery wake_armed : just the mouse and keyboard appear
    9) I tried netstat which shows many connections but do not know how to interpret them or what to look for. Same for
    Wireshark. If anybody can guide me on how to use these tools, I am happy to learn about it.
    10) powercfg -requestsoverride DRIVER \FileSystem\srvnet SYSTEM
    did not help, reverted it.
    11) Uninstalled software some would find suspicious: Cisco Anyconnect VPN Client, Shadowprotect Desktop backup software, VMware player. Did not help.
    12) I also have a MySQL server installed, which I did NOT uninstall because it would be too much point reinstalling and reconfiguring it. However, I doubt this is the culprit as with Windows 8 it did not prevent any sleep. Even when I stop the server the
    PC does not go to sleep.
    This is more or less it. I am out of ideas and welcome any feedback.
    Again, when the Ethernet adapter is disabled, the PC sleeps as programmed, but I cannot figure out what communication is responsible for keeping it awake.
    Thanks,
    Steve

    Hi Steve,
    I don't know if you'll feel better but - You are not alone facing the same problems, I am sure that all the power handling in 8.1 is a mess. If I force the comp. to go to sleep mode, after a while it is
    not staying in the sleep mode but shutting down autonomously. I suppose there is more hidden bugs.  
    Tazlam
    Isn't your computer just switching from sleep mode to hibernation mode after the amount of time set in your power management settings? This sounds like it, as in hibernation the computer is effectively shut off. This is also intended behaviour.
    As you guys, I hope MS releases a fix soon.

  • Iphone voice memos does not stay open

    iphone voice memos does not stay open

    Try a reset: Simultaneously hold down the Home and On buttons until the device shuts down. Ignore the off slider if it appears. Once shut down is complete, if it doesn't restart on it own, turn the device back on using the On button. In some cases it also helps to double click the Home button and close all apps BEFORE doing the reset.

  • Iphone does not stay connected to wi-fi.

    When using apps or when in sleep mode my iphone does not stay connected to my wi-fi. All other items within the house have no issues with staying connected to my wi-fi.

    By design, when entering sleep mode, the iPhone will disconnect from WiFi to conserve battery. If you want the WiFi connection to remain persistent, plug your phone into a power source.

  • My note app does not stay open

    My note app does not stay open
    <Email Edited by Host>

    Try a reset: Simultaneously hold down the Home and On buttons until the device shuts down. Ignore the off slider if it appears. Once shut down is complete, if it doesn't restart on it own, turn the device back on using the On button. In some cases it also helps to double click the Home button and close all apps BEFORE doing the reset.

  • Windows Security Suite does not recognize Verizon Internet Security Suite

    Windows Secuity Suite does not recognize that the Verizon Internet Security suite on one of my PC's is running and keeps popping up aWindows Security Alert. The Firewall is enabled within Verizon Internet Security suite.
    My other PC's don't have this issue.
    All PC's are running Windows Vista Home Premium.
    Any ideas?
    Cheers,
    Mark

    well that error message is saying that Windows security center no longer supports the way that the VISS is reporting. Which means that even though VISS is working and it is even reporting its status to WSC. WSC doesnt recognize it anymore. Likely one of the windows updates made the change. I can see the fight comming now. Verizon is going to say. Its working and if the other program doesnt support it, too bad. And windows is going to say the same thing in reverse. My guess would be that it will probably stay that way unless Verizon or Microsoft get enough complaints to make a change in the recognition system.
    But the good news is that VISS is running and protecting you. The WSC just doesnt "speak the same language" anymore and cant understand the message from VISS saying "I'm up and running"
    ====================================================================================
    Error exists between keyboard and chair.

  • How do i share itunes music? I have a Mac and she is on Windows. She does not have an iTunes or iCloud ID

    How do i share itunes music? I have a Mac and she is on Windows. She does not have an iTunes or iCloud ID.

    You could install iTunes on her PC, then sign in using your ID and activate her computer (iTunes menu bar: Store Authorize This Computer) in order to download your previous purchased media files.

  • Windows 2008 R2 does not work on Sunfire X4170

    Hi, I recently bought a used X4170 server and have a weird problem. Windows 2008 R2 does not work, but 2012 does. I tried RTM version and a version with SP1. The problem is this:
    After installing, I set the password and windows just displays a blank desktop, sometimes it boots but freezes soon after - the mouse cursor moved but nothing else works.
    Booting in Safe Mode works and Windows do not freeze. The Event Log contains lots and lots (about 20 per second) of these entries:
    Log Name: 
    System
    Source:   
    Microsoft-Windows-WHEA-Logger
    Date:     
    6/21/2014 12:24:59 AM
    Event ID: 
    17
    Task Category: None
    Level:    
    Warning
    Keywords:
    User:     
    LOCAL SERVICE
    Computer: 
    WIN-SOGS2TPM334
    Description:
    A corrected hardware error has occurred.
    Component: PCI Express Root Port
    Error Source: Advanced Error Reporting (PCI Express)
    Bus:Device:Function: 0x0:0x0:0x0
    Vendor ID:Device ID: 0x8086:0x3406
    Class Code: 0x30000
    I have tried updating the driver for this device (downloaded from Intel), no difference. Is there a way to make Windows 2008 R2 work on this server?

    Hello
    Thank you for the update.
    Please refer the below Knowledge document related to this issue:
      Windows BSOD WHEA_UNCORRECTABLE_ERROR(124) & correctable WHEA events when disabling network ports on X4170M2/X4270M2 (Doc ID 1576683.1)
    However above document talks about X4170M2, I would suggest you to follow and if issue persist, please open Service Request with Oracle to diagnose further.
    Best Regards
    Bhavyesh

  • Devanagari font in layed out in Indesign (using IndicPlus) does not export correctly to a PDF.

    Namaste InDesign gurus,
          I have a problem at hand. Wondering if anyone has encoutered similar problem before? Any help is greatly appreciated. And if you're in San Francisco bay area - I can buy you a lunch :-)
    Short description: Devanagari font in layed out in Indesign (using IndicPlus) does not export correctly to a PDF. All the ligatures are assembled and displayed in the PDF.
    Adobe Indesign Version: InDesign CS5 Design Premium - regular U.S. version (not ME).
    Steps I took:
              I purchased CS5 Design Premium and also purchased the IndicPlus plugin to author sanskrit documents in InDesign. I create Sanskrit text using either of the following methods.
    1) Itranslator
    2) Paste the devanagari from the Itranslator directly into InDesign or paste it first into MSWord and then copy from MSWord and paste it to Indesign.
    It doesn't matter how I paste it. After I apply the IndicPlus character/paragraph style so that the sanskrit looks good in InDesign, when I try to export it to a PDF. The PDF does not display the ligatures currectly. It just lists all the characters in order without assembling.
    I've spent a lot of money buying CS5, IndicPlus and then I can't even create a simple PDF document from InDesign. It is very frustrating.
    Has anyone been able to successfully export a sanscrit document from InDesign PDF ?
    (Please let me know if my problem description needs more fleshing out).
    I could create the PDF from MSWord directly but I'm trying to use indesign to layout my book. If InDesign cannot export to PDF I'll just have to use MSWord for my book layout. I've spend probably scores of hours trying to learn InDeisn and formatting my book content - seems like it is all going to be waste.
    Is MSWord the best choice or only choice for laying out books that have sanskrit text in them?
    -Ravi

    Has anyone been able to successfully export a sanscrit document from InDesign PDF ?
    Not Sanskrit, no, but plenty of Hindi, Nepali, Marathi, and other languages written in Devanagari script - so it should be possible. I don't even use IndicPlus, which by most accounts makes working with Indic text much easier.
    1) Itranslator
    I've never seen this, but a quick Google led me to the homepage of ITranslator for Windows, where I saw this:
    Itranslator 99 (Build 1.3.0.86)  & New Beta Version
    uses 8-bit true type fonts and is compatible
    with Windows 95/98/ME/NT/2000/XP.
    For more information, click here.
    Itranslator 2003 (Build 2.0.0.38) & New Beta Version
    uses 16-bit Unicode-compatible fonts and is working
    only on Windows 2000 / XP / Server 2003.
    For more information, click here.
    So, if you're using ITranslator 99, there's the problem - those "8-bit true type fonts" won't work in InDesign. Can you post a sample of the text you're trying to paste into InDesign? Name the font(s) you are using, both in Word and in Indesign, and if possible make a small sample of the text available for us to test. It's also possible that InDesign is using a substituted font, which could cause this problem. So, if the font name in InDesign has brackets around it, you know that InDesign doesn't actually have that font installed and is auto-substituting. Also, if you go to View -> Screen Mode -> Normal and the text is highlighted pink, you know that the font has dropped. (Unless the highlighting for dropped fonts was turned off - check in Edit -> Preferences -> Composition and make sure that "Substituted Fonts" is checked.
    Also, for what it's worth, is there any way you could Place your text instead of copying and pasting? This may be cause of your problem - but even though it probably isn't, it's still worth a try.
    Lastly - no, I've found InDesign to be superior for typesetting for almost all languages, but the learning curve is pretty steep, and many of the problems faced by people working in non-English languages are not easy to research when you have a problem.

  • HT1386 windows media player does not recognise my ipod nano

    windows media player does not recognise my ipod nano

    irishjohn1 wrote:
    windows media player does not recognise my ipod nano
    Use iTunes.  It is designed to sync a Nano and other Apple devices.

  • When I click on a bookmark to open it, the bookmark (in the sidebar) does not stay highlighted. Why?

    When I open a bookmark, the bookmark title from the list in the sidebar does not stay highlighted. It used to but doesn't anymore. Do you know why? Can I change an option to get that feature back?

    Hello Donald.
    Although possibly not related to your problem, I will remind you that the version of Firefox you are using at the moment has been discontinued and is no longer supported. Furthermore, it has known bugs and security problems. I urge you to update to the latest version of Firefox, for maximum stability, performance, security and usability. You can get it for free, as always, at [http://www.getfirefox.com getfirefox.com].
    As for your issue, you may be having a problem with some Firefox add-on that is hindering your Firefox's normal behavior. Have you tried disabling all add-ons (just to check), to see if Firefox goes back to normal?
    Whenever you have a problem with Firefox, whatever it is, you should make sure it's not coming from one of your installed add-ons, be it an extension, a theme or a plugin. To do that easily and cleanly, run Firefox in [http://support.mozilla.com/en-US/kb/Safe+Mode safe mode] and select ''Disable all add-ons''. If the problem disappears, you know it's from an add-on. Disable them all in normal mode, and enable them one at a time until you find the source of the problem. See [http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes this article] for information about troubleshooting extensions and theme. You can troubleshoot plugins the same way.
    If you want support for one of your add-ons, you'll need to contact its author.

  • IPod 30GB (MA446LL/A) Does Not Stay On and Clicks

    After connecting the iPod to my laptop, the Apple icon appears but it does not stay on (blinks on and off) and I hear a click. The unit has been sitting in my drawer for almost one year and has not been charged or used within that time.
    1. Does this affect the unit?
    2. Do I need to have iTunes loaded on my laptop for this unit to actually stay on?
    3. Can this be fixed? If so, how?
    Any help would be appreciated

    I had a 15GB model with similar problems and reached a solution.
    • First of all, charge the darn thing! If you don't have the necessary power adapter, your laptop should do. Normally, when the power is low, you'll get an icon on the screen to tell you as much. When it's really, really low, then it can't even load that much up, as seems to be your case. Charging it should be a big help. Just don't expect the time and date to be correct at that point.
    • You don't have to have iTunes loaded on your machine to charge it. However, if and when it comes down to it, you will have to have it to restore the iPod and then sync you library to it again.
    If this doesn't work, there are a few more extreme options to try. Let me know if that's the case, and I'll detail them for you.

Maybe you are looking for

  • IPod Touch cannot connect to local Wi-Fi

    So, iPod Tuch 4g with OS 5.1.1 finds my local router, but it just says "connection to network [...] failed". MAC-filter is activated, but the iPod is authorized to connect. It doesn't work even if the filter is deactivated. It worked with no problems

  • Every time I try to download or update an app I receive a notice that says The item is not currently available in The UK store. ***? I'm in California

    Everytime I try to download or an app or Download an update for an app I have, I receive a notice that says "unavailable in the U.K. store" What the heck? I am in California

  • Upgrade an Upgrade?

    Can I upgrade an upgrade of Final Cut Pro 5? It is not an academic version. I originally purchased Final Cut Express years ago and upgraded to Final Cut Pro when that was still allowed. Can I now upgrade to Final Cut Studio3? Both previous versions w

  • Cant install driver for display adapter (pavilon dv3)

    Hi! i cant find and install driver for display adapter. i see on device manager that without "ATI radeon 5400 seri" someone help me! thanks This question was solved. View Solution.

  • Не могу создать Adobe ID

    При создании Adobe ID, после нажатия "Создать" появляется сообщение "Невозможно запустить подписку на Adobe Photoshop CS5 Extended Subscription Edition.  Что мне делать чтобы начать работать в Photoshop CS5? Ответ можно направлять на [email protected