Limit of prompt is 255 characters, or Photoshop crashes!  Is there a better way?

I noticed today that the command 'prompt' seems to have a limit where it accepts no more than 255 characters.  If you try to enter more, Photoshop crashes!

Photoshop CC v14.2.1 x 64

Windows 7 64-bit SP1

16 GB OF RAM

I tried the following:

var defaultTextString = ' 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 90123456789.123456789012345678901234567890123456789012345678901234567890123456789012345678 901234567890123456789.1234567890123456789012345678901234567890123456789 | 12345. "
textString var = prompt ("enter the number:", defaultTextString);

With 255 characters in the defaultTextString, the prompt works as expected.  If you add an extra character to the defaultTextString, the dialog box appears as expected with the full text by default as expected.  However, when you click the OK button, you get the error next to Windows and closed from Photoshop.

Adobe Photoshop CC has stopped working

A problem caused the blocking of the program works correctly.

Windows will close the program and notify you if a solution is

available.

I'm relatively new to Photoshop scripting.  Y at - it another command I should use for entering text greater than 255 characters?

-Brad

Davide,

Thank you for taking the time to respond with the code example.  I tried to copy and paste it in a new window in ExtendScript Toolkit, and I got an error on line 2.  Unfortunately, I am not experienced enough yet to find the exact problem.  However, you got me in the right direction, and I was able to learn a lot about windows!

For the benefit of third parties, there is called ScriptUI window for Photoshop code.  I found a useful tutorial here: ScriptUI for Dummies | Peter Kahrel

What I found on the web, CS2 scripting guide contains the most complete documentation for ScriptUI (see Chapter 4): Adobe CS2 Photoshop JavaScript Scripting Reference - JavaScriptReferenceGuide.pdf

-Brad

Tags: Photoshop

Similar Questions

Maybe you are looking for

  • Toggle Subscribe auto is no longer available.

    I am trying to stop these two applications of auto-abonnement and this option is not yet available more in subscription management options. What has changed and how do I unsubscribe?

  • 4th generation iPod not charging

    I had some problems with getting my 4th generation iPod (grey levels) to load.  When I plug it into the usb power brick, the battery with exclamation point icon flashes, and the iPod will never start.  I can force it to start after he flashed for a w

  • XPS 10 screen Glitch

    The screen on my new XPS 10 keeps glitching out, it behaves as if my finger is to hit the screen in the upper left corner on several occasions. The display shows even the bubble indicator as if I were really not touch. It becomes very annoying when t

  • I get an error 0x6D9 code when I try to turn on the Windows Firewall.

    Original title: snap-in failed to load with error 0x6D9 to windows firewall code 7 Hello. I have a problem 2 days now.i trying to open my firewall windows 7 but nothing happen is .i then tries to open the Advanced Security windows firewall but I get

  • How to change the size of any field?

    Hello, I'm developing a CLDC Application on JDE 4.7, and I have a problem while I create a custom field (no field, NullField, VertivalFieldManaher, LabalField, etc.). I do an override of the method getPreferredWidth() or getPreferredHeight() to set t