Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

Prompt limit is 255 characters, otherwise Photoshop crashes! Is there a better way?

$
0
0

I noticed today that the "prompt" command appears to have a limit where it can accept no more than 255 characters.  If you try to enter more, Photoshop crashes!

 

Photoshop CC v14.2.1 x64

Windows 7 64-bit SP1

16 GB RAM

 

I tried the following:

    var defaultTextString = "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 90123456789.123456789012345678901234567890123456789012345678901234567890123456789012345678 901234567890123456789.1234567890123456789012345678901234567890123456789|12345";
    var textString = prompt("Enter citation:", defaultTextString);

 

With 255 characters in the defaultTextString, the prompt works as expected.  If you add an additional character to the defaultTextString, the prompt box comes up as expected with the full default text as expected.  However, when you hit the OK button, you get the following Windows error and Photoshop closes.

 

Adobe Photoshop CC has stopped working

A problem caused the program to stop working correctly. 

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

available.

 

I am relatively new to Photoshop scripting.  Is there another command that I should be using for text input larger that 255 characters?

 

  - Brad


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>