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

Is there a way to pause the history ?

New Here ,
Feb 28, 2018 Feb 28, 2018

Copy link to clipboard

Copied

Hi there!

Is there a way to pause the history ?

I do not want to record the process of moving the layer in the history.

function proc()

{

    var layerActive = app.activeDocument.activeLayer ;

    pause history

    layerActive.translate( mx, my ) ;

    resume history

}

Or is there a way to move a layer without recording it ?

Thank you.

TOPICS
Actions and scripting

Views

1.1K

Translate

Translate

Report

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

correct answers 1 Correct answer

Engaged , Feb 28, 2018 Feb 28, 2018

There's no history pause, but history suspend – which is a way to provide a single history state for the entire script (one single undo for all actions taken in the script)

app.activeDocument.suspendHistory('Secret step!', 'main()');

function main() {

  // whatever needs to be done

}

Hope this helps,

Davide

Votes

Translate

Translate
Adobe
Engaged ,
Feb 28, 2018 Feb 28, 2018

Copy link to clipboard

Copied

There's no history pause, but history suspend – which is a way to provide a single history state for the entire script (one single undo for all actions taken in the script)

app.activeDocument.suspendHistory('Secret step!', 'main()');

function main() {

  // whatever needs to be done

}

Hope this helps,

Davide

Davide Barranca - PS developer and author
www.ps-scripting.com

Votes

Translate

Translate

Report

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
New Here ,
Mar 01, 2018 Mar 01, 2018

Copy link to clipboard

Copied

LATEST

I see.

I just barely made it.

Thank you!

Votes

Translate

Translate

Report

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