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

Can I record actions in InDesign

Explorer ,
Feb 18, 2021 Feb 18, 2021

Copy link to clipboard

Copied

Is there a way to record an action in InDeisgn that would work with Photoshop? Rather than having to right click on an image, open in Photoshop, preform an action on my image then save and update the link in Indeisgn, can I do it with one action? So the InDesign action would open the selected image in Photoshop - do a photoshop action with a save and close, then update the link in InDesign. Just saves me a few clicks per image, but as I have thousands of images that need various actions performing on them it would save a lot of time.

TOPICS
Scripting

Views

1.4K

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

Community Expert , Feb 18, 2021 Feb 18, 2021

Simple answer: no.

But maybe you/someone can script something 😉

Votes

Translate

Translate
Community Expert ,
Feb 18, 2021 Feb 18, 2021

Copy link to clipboard

Copied

Simple answer: no.

But maybe you/someone can script something 😉

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
Enthusiast ,
Feb 20, 2021 Feb 20, 2021

Copy link to clipboard

Copied

Hi @Matthew5C62,
for the use case you mentioned, have a look at Zevrix's LinkOptimizer,

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
Community Expert ,
Feb 21, 2021 Feb 21, 2021

Copy link to clipboard

Copied

 

Try this.

Edit the first two variables for your action—the action’s name and it’s group name—names are case sensitive.

 

EDIT: I added a loop to update the link after the Photoshop action runs

 

 

 

 

//Opens a selected image in Photoshop and runs an action
//Rob Day 2-21-2021

//#target indesign
#targetengine "session" 

//edit as needed names are case sensitive
var act = "Your Action"
var actgrp = "Your Action Group"

var doc = app.documents.item(0);
var s = doc.selection[0];

if (s == null || s.constructor.name != "Image") {
	alert("Please Direct Select an Image and Try Again.")
} else {
    var lnk = s.itemLink
    if (lnk.status == LinkStatus.NORMAL || lnk.status == LinkStatus.LINK_OUT_OF_DATE) {
        editImage(s.itemLink.filePath, act, actgrp);
    }else{
        alert("Image link is missing.")
        exit()
    }   
}


while (lnk.status != LinkStatus.NORMAL) {
    lnk.update();
}


/**
* Opens Photoshop via Bridgetalk and runs psScript 
*  the file path to open 
*  the action to run 
*  the actions group
*  value void
* 
*/
function editImage(s, act, actgrp){
    var bt = new BridgeTalk();  
    bt.target = "photoshop";
    bt.body = "var s = '"+s+"'; var act = '"+act+"'; var actgrp = '"+actgrp+"'; var func = " + psScript.toString() + "func();";

    bt.onResult = function(resObj) { }  
    bt.onError = function( inBT ) { alert(inBT.body); };  
    bt.send(8);  
      
    function psScript() {  
        var f = open(File(s)) 
        doAction(act, actgrp)
        f.save()
        f.close()
    }  
}

 

 

 

 

 

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 29, 2023 Mar 29, 2023

Copy link to clipboard

Copied

LATEST

I am very sorry I block record button I am saying to say Please open records option 

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