Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

need to pause the action

Guest
Sep 18, 2013 Sep 18, 2013

I have one action with 15 steps . How can the action pause at 7th and 11th step in 5 seconds ? I insert Stop but after the action stops I have to click play button to continue- it takes time. Thanks for your help.

TOPICS
Actions and scripting
770
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Sep 18, 2013 Sep 18, 2013

At the worst it should be possible to create a Script that gets the current time and then gets the time again and again until the difference between the original and the current one are larger than a certain number.

But have you done a Forum search yet?

Somedody else may know of a better approach and I suspect the issue may have come up before. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Sep 18, 2013 Sep 18, 2013

You can use the built-in action pause playback option but you will need to create two scripts. One to set the option to pause and the second to set it back normal.

function setPlayback( optionID, seconds ) {

    //stringIDToTypeID('accelerated')

    //stringIDToTypeID('pause')

    // second argument required only when id = pause

    var desc = new ActionDescriptor();

        var ref = new ActionReference();

        ref.putProperty( charIDToTypeID('Prpr'), charIDToTypeID('PbkO') );

        ref.putEnumerated( charIDToTypeID('capp'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );

    desc.putReference( charIDToTypeID('null'), ref );

        var optionsDesc = new ActionDescriptor();

        optionsDesc.putEnumerated( stringIDToTypeID('performance'), stringIDToTypeID('performance'), optionID );

        if(seconds!=undefined) optionsDesc.putInteger( stringIDToTypeID('pause'), seconds );

    desc.putObject( charIDToTypeID('T   '), charIDToTypeID('PbkO'), optionsDesc );

    executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );

};

setPlayback( stringIDToTypeID('pause') , 5 );

and

function setPlayback( optionID, seconds ) {

    //stringIDToTypeID('accelerated')

    //stringIDToTypeID('pause')

    // second argument required only when id = pause

    var desc = new ActionDescriptor();

        var ref = new ActionReference();

        ref.putProperty( charIDToTypeID('Prpr'), charIDToTypeID('PbkO') );

        ref.putEnumerated( charIDToTypeID('capp'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );

    desc.putReference( charIDToTypeID('null'), ref );

        var optionsDesc = new ActionDescriptor();

        optionsDesc.putEnumerated( stringIDToTypeID('performance'), stringIDToTypeID('performance'), optionID );

        if(seconds!=undefined) optionsDesc.putInteger( stringIDToTypeID('pause'), seconds );

    desc.putObject( charIDToTypeID('T   '), charIDToTypeID('PbkO'), optionsDesc );

    executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );

};

setPlayback( stringIDToTypeID('accelerated') );

Then where you need the pause have the action run those two scripts.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 18, 2013 Sep 18, 2013

Good one!

As I practically never use it I hadn’t even remembered/noticed that there was a duration setting for the Playback Options’ Pause.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 18, 2013 Sep 18, 2013
LATEST

Thanks Michael Hale alot ! That's great and help me save time working with hundreds of images .

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines