Skip to main content
s_ashok
Known Participant
February 14, 2017
Question

Photoshop Javascript for activate the check spelling menu

  • February 14, 2017
  • 4 replies
  • 827 views

Hi All,

I want to call the check spelling option using photoshop CC JavaScript. Below coding is not working.

"app.executeMenuCommand('Check Spelling'); "

Please advise me

Thanks in advance.

Regards

Ashok

This topic has been closed for replies.

4 replies

s_ashok
s_ashokAuthor
Known Participant
February 14, 2017

Hi,

When I run the script its throwing error. screenshot attached below.

When I did manual spell checks its working fine.

Please advise me

Regards

Ashok

c.pfaffenbichler
Community Expert
Community Expert
February 14, 2017

Then install ScriptingListener.plugin and record the procedure on your computer.

s_ashok
s_ashokAuthor
Known Participant
February 14, 2017

Hi,

When I run the script its throwing error. screenshot attached below.

When I did manual spell checks its working fine.

Please advise me

Regards

Ashok

s_ashok
s_ashokAuthor
Known Participant
February 14, 2017

Thanks SO MUCH!!!

This is what I needed.

Thanks once again,

-Ashok

c.pfaffenbichler
Community Expert
Community Expert
February 14, 2017

ScriptingListener.plugin records this:

// =======================================================

var idspellCheck = stringIDToTypeID( "spellCheck" );

    var desc5 = new ActionDescriptor();

    var idnull = charIDToTypeID( "null" );

        var ref1 = new ActionReference();

        var idPrpr = charIDToTypeID( "Prpr" );

        var idspellCheck = stringIDToTypeID( "spellCheck" );

        ref1.putProperty( idPrpr, idspellCheck );

        var idTxLr = charIDToTypeID( "TxLr" );

        var idOrdn = charIDToTypeID( "Ordn" );

        var idAl = charIDToTypeID( "Al  " );

        ref1.putEnumerated( idTxLr, idOrdn, idAl );

    desc5.putReference( idnull, ref1 );

    var idUsng = charIDToTypeID( "Usng" );

        var desc6 = new ActionDescriptor();

        var idcheckAll = stringIDToTypeID( "checkAll" );

        desc6.putBoolean( idcheckAll, true );

    var idspellCheck = stringIDToTypeID( "spellCheck" );

    desc5.putObject( idUsng, idspellCheck, desc6 );

executeAction( idspellCheck, desc5, DialogModes.NO );