Highlighted

Editing an action to remove references to my username?

Community Beginner ,
Oct 07, 2020

Copy link to clipboard

Copied

Hi,

 

Is there a way to edit a Photoshop action in this way... 

 

  • I have 2 folders in my computer's Downloads folder... One is called PSD_SOURCE... The other is called PNG_DESTINATION.
  • Can I change the action so instead of pointing to MY USER Downloads folder, it would  instead point to ANY USER's Downloads folder?

 

So this: 

/Users/MYusername/Downloads/PSD_SOURCE 

/Users/MYusername/Downloads/PNG_DESTINATION

 

would instead point to: 

/Users/ANYONESusername/Downloads/PSD_SOURCE

/Users/ANYONESusername/Downloads/PNG_DESTINATION

 

The reason — I want to send a series of complex actions (that call other actions) to multiple coworkers around the world. Because there are many steps, I want to eliminate all the pop up windows asking them to set new source and destination folders each time. I'd rather just tell them in the beginning to create the two folders they need and put them in their Downloads folder, and then have the actions work seamlessly... 

 

Screen Shot 2020-10-07 at 3.46.46 PM.png

TOPICS
Actions and scripting, Feature request, How to, Mac, Problem or error

Views

124

Likes

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

Editing an action to remove references to my username?

Community Beginner ,
Oct 07, 2020

Copy link to clipboard

Copied

Hi,

 

Is there a way to edit a Photoshop action in this way... 

 

  • I have 2 folders in my computer's Downloads folder... One is called PSD_SOURCE... The other is called PNG_DESTINATION.
  • Can I change the action so instead of pointing to MY USER Downloads folder, it would  instead point to ANY USER's Downloads folder?

 

So this: 

/Users/MYusername/Downloads/PSD_SOURCE 

/Users/MYusername/Downloads/PNG_DESTINATION

 

would instead point to: 

/Users/ANYONESusername/Downloads/PSD_SOURCE

/Users/ANYONESusername/Downloads/PNG_DESTINATION

 

The reason — I want to send a series of complex actions (that call other actions) to multiple coworkers around the world. Because there are many steps, I want to eliminate all the pop up windows asking them to set new source and destination folders each time. I'd rather just tell them in the beginning to create the two folders they need and put them in their Downloads folder, and then have the actions work seamlessly... 

 

Screen Shot 2020-10-07 at 3.46.46 PM.png

TOPICS
Actions and scripting, Feature request, How to, Mac, Problem or error

Views

125

Likes

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
Oct 07, 2020 1
Most Valuable Participant ,
Oct 07, 2020

Copy link to clipboard

Copied

In xTools there are app scripts "ActionFileToJavascript.jsx",  "ActionFileToXML.jsx" and "ActionFileFromXML.jsx",  You use these on you Action Sets .atn files. "ActionFileToJavascript.jsx" will make Photoshop scripts  from you actions,    "ActionFileToXML.jsx" will convert you action set to XLM  so  you can edit the actions with a text editor then use  "ActionFileFromXML.jsx" on the xml file to create an updated Action set.

 

You may be able to change

/Users/MYusername/Downloads/PSD_SOURCE 

/Users/MYusername/Downloads/PNG_DESTINATION

to

~/Downloads/PSD_SOURCE 

~/Downloads/PNG_DESTINATION

 

In Photoshop scripting  ~/  is use on Windows and Mac for current  users root space  ie on windows /c/Users/"CurrentUserId"/ Of it doe not wotm via the XML route  it should work via the Script route

  

JJMack

Likes

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
Reply
Loading...
Oct 07, 2020 0
Community Beginner ,
Oct 07, 2020

Copy link to clipboard

Copied

Thank you so much! 

 

Likes

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
Reply
Loading...
Oct 07, 2020 0
Community Beginner ,
Oct 07, 2020

Copy link to clipboard

Copied

Actually, I'm on a Mac... Do you know of a way to do this using a Mac tool? 

 

Thanks!

Likes

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
Reply
Loading...
Oct 07, 2020 0
Community Beginner ,
Oct 07, 2020

Copy link to clipboard

Copied

Found this online to convert .atn files to .txt: 

  • Press Ctrl+Alt (Windows) or Command+Option (Mac OS) when you
  • choose the Save Actions command to save the actions in a text file.

1742111_sa.png

Made the changes you suggested...

Now just have to figure out how to get the .txt file back to a .atn

Likes

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
Reply
Loading...
Oct 07, 2020 0
Most Valuable Participant ,
Oct 07, 2020

Copy link to clipboard

Copied

You can not convert that txt file to actions. You need Photoshop XTools xtools v2.3 

JJMack

Likes

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
Reply
Loading...
Oct 07, 2020 0
Community Beginner ,
Oct 07, 2020

Copy link to clipboard

Copied

Thanks so much. Trying it now. 🙂 

Likes

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
Reply
Loading...
Oct 07, 2020 0
Community Beginner ,
Oct 07, 2020

Copy link to clipboard

Copied

As a graphic designer, I'm very proud of myself...

I got xtools installed, I figured out how to run the scripts (from inside Photoshop!), save the actions out to XML, downloaded BBEdit and edited and saved the XML, then converted it back to an ATN file, and was able to run the actions.

 

But as a graphic designer, I'm also not surprised that my code (sadly) didn't work. 😞 

 

Screen Shot 2020-10-07 at 8.41.43 PM.png

Screen Shot 2020-10-07 at 8.30.21 PM.png

  

Likes

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
Reply
Loading...
Oct 07, 2020 0
Most Valuable Participant ,
Oct 07, 2020

Copy link to clipboard

Copied

The problem you are most likely having is the your using the Batch Plug-in  and the action step is sending it a message with settings for the Batch processor's  Dialog parameters  and the plug-in's dialog parser doe not support the scripting file system convention. For the plug-in recorded the path whet you chaos a folder recording the action.    You may want to download the Image Processor Pro Plug-in script and batch your action with it.  Its a much better batch processor than File>automate>Batch.  however Batch can replace output files  The image processor scripts can not. The are designed to only save new unique files.

 

The proble with the Image Processor Pro Plug-in script is me version of Photoshop doe not recorde its step correvtlt alt old versiob the doe  the  steo look empty.  They work but are more or less invisible. With "ActionFileToXML.jsx" I can set the invisible steps content and it to shows the recorded paramaters for the IPP Dialog as full Paths not the scripting convention for current user.

<ActionFile key="IPPVersions.atn" file="/e/My%20Files/Documents/My%20Photoshop%20Actions/JJMacks/IPPVersions.atn">
  <ActionSet version="16" name="IPPVersions" expanded="false" count="4">
    <Action key="1" name="Same As Versions" expanded="true" count="1">
      <ActionItem key="TEXT" expanded="false" enabled="true" withDialog="false" dialogOptions="0" identifier="TEXT" event="611736f0-9c46-11e0-aa82-0800200c9a66" name="" hasDescriptor="true">
        <ActionDescriptor key="611736f0-9c46-11e0-aa82-0800200c9a66" count="2">
          <DescValueType.STRINGTYPE key="2965" id="2965" symname="ImageProcessorProSettings" sym="2965" string="&lt;ImageProcessorProSettings>&#xA;  &lt;input source=&quot;currentImage&quot;/>&#xA;  &lt;output path=&quot;same&quot; subfolder=&quot;false&quot; keepStructure=&quot;false&quot; retainOriginal=&quot;true&quot;/>&#xA;  &lt;taskList>&#xA;    &lt;task enabled=&quot;true&quot; subfolderName=&quot;Set 1&quot; colorProfile=&quot;sRGB IEC61966-2.1&quot;>&#xA;      &lt;saveOptions fileSaveType=&quot;SaS&quot;/>&#xA;      &lt;resizeOptions enabled=&quot;false&quot;/>&#xA;      &lt;action enabled=&quot;false&quot; when=&quot;Before Image Resize&quot; set=&quot;Default Actions&quot; name=&quot;Sepia Toning (layer)&quot;/>&#xA;      &lt;namingOptions startingSerial=&quot;1&quot;>Name,lowerCaseExtension&lt;/namingOptions>&#xA;    &lt;/task>&#xA;  &lt;/taskList>&#xA;  &lt;preferences>&#xA;    &lt;preserveFileName>false&lt;/preserveFileName>&#xA;  &lt;/preferences>&#xA;  &lt;uiPrefs>&#xA;    &lt;lastX>300&lt;/lastX>&#xA;    &lt;lastY>111&lt;/lastY>&#xA;    &lt;lastSettingsFile>C:\Users\jjmac\AppData\Roaming\PamSlideShow.xml&lt;/lastSettingsFile>&#xA;    &lt;lastInputFolder>~/Desktop/ImageSource/obj0&lt;/lastInputFolder>&#xA;    &lt;lastOutputFolder>C:\Users\jjmac\Desktop\ImageSave&lt;/lastOutputFolder>&#xA;  &lt;/uiPrefs>&#xA;  &lt;date>2020-07-18T16:40:20&lt;/date>&#xA;  &lt;version>3.2b5&lt;/version>&#xA;&lt;/ImageProcessorProSettings>"/>
          <DescValueType.STRINGTYPE key="1299408741" id="1299408741" symname="Message" sym="Msge" string="Settings for Image Processor Pro"/>
        </ActionDescriptor>
      </ActionItem>
    </Action>
    <Action key="2" name="JPG Versions" expanded="true" count="1">
      <ActionItem key="TEXT" expanded="false" enabled="true" withDialog="false" dialogOptions="0" identifier="TEXT" event="611736f0-9c46-11e0-aa82-0800200c9a66" name="" hasDescriptor="true">
        <ActionDescriptor key="611736f0-9c46-11e0-aa82-0800200c9a66" count="2">
          <DescValueType.STRINGTYPE key="2965" id="2965" symname="ImageProcessorProSettings" sym="2965" string="&lt;ImageProcessorProSettings>&#xA;  &lt;input source=&quot;currentImage&quot;/>&#xA;  &lt;output path=&quot;same&quot; subfolder=&quot;false&quot; keepStructure=&quot;false&quot; retainOriginal=&quot;true&quot;/>&#xA;  &lt;taskList>&#xA;    &lt;task enabled=&quot;true&quot; subfolderName=&quot;Set 1&quot; colorProfile=&quot;sRGB IEC61966-2.1&quot;>&#xA;      &lt;saveOptions fileSaveType=&quot;jpg&quot; jpgQuality=&quot;10&quot; jpgEmbedColorProfile=&quot;true&quot; jpgFormat=&quot;Standard&quot; jpgConvertToSRGB=&quot;false&quot; saveForWeb=&quot;false&quot;/>&#xA;      &lt;resizeOptions enabled=&quot;false&quot;/>&#xA;      &lt;action enabled=&quot;false&quot; when=&quot;Before Image Resize&quot; set=&quot;Default Actions&quot; name=&quot;Sepia Toning (layer)&quot;/>&#xA;      &lt;namingOptions startingSerial=&quot;1&quot;>Name,lowerCaseExtension&lt;/namingOptions>&#xA;    &lt;/task>&#xA;  &lt;/taskList>&#xA;  &lt;preferences>&#xA;    &lt;preserveFileName>false&lt;/preserveFileName>&#xA;  &lt;/preferences>&#xA;  &lt;uiPrefs>&#xA;    &lt;lastX>300&lt;/lastX>&#xA;    &lt;lastY>111&lt;/lastY>&#xA;    &lt;lastSettingsFile>C:\Users\jjmac\AppData\Roaming\PamSlideShow.xml&lt;/lastSettingsFile>&#xA;    &lt;lastInputFolder>~/Desktop/ImageSource/obj0&lt;/lastInputFolder>&#xA;    &lt;lastOutputFolder>C:\Users\jjmac\Desktop\ImageSave&lt;/lastOutputFolder>&#xA;  &lt;/uiPrefs>&#xA;  &lt;date>2020-07-18T16:41:58&lt;/date>&#xA;  &lt;version>3.2b5&lt;/version>&#xA;&lt;/ImageProcessorProSettings>"/>
          <DescValueType.STRINGTYPE key="1299408741" id="1299408741" symname="Message" sym="Msge" string="Settings for Image Processor Pro"/>
        </ActionDescriptor>
      </ActionItem>
    </Action>
    <Action key="3" name="PSD Versions" expanded="true" count="1">
      <ActionItem key="TEXT" expanded="false" enabled="true" withDialog="false" dialogOptions="0" identifier="TEXT" event="611736f0-9c46-11e0-aa82-0800200c9a66" name="" hasDescriptor="true">
        <ActionDescriptor key="611736f0-9c46-11e0-aa82-0800200c9a66" count="2">
          <DescValueType.STRINGTYPE key="2965" id="2965" symname="ImageProcessorProSettings" sym="2965" string="&lt;ImageProcessorProSettings>&#xA;  &lt;input source=&quot;currentImage&quot;/>&#xA;  &lt;output path=&quot;same&quot; subfolder=&quot;false&quot; keepStructure=&quot;false&quot; retainOriginal=&quot;true&quot;/>&#xA;  &lt;taskList>&#xA;    &lt;task enabled=&quot;true&quot; subfolderName=&quot;Set 1&quot; colorProfile=&quot;sRGB IEC61966-2.1&quot;>&#xA;      &lt;saveOptions fileSaveType=&quot;psd&quot; psdAlphaChannels=&quot;true&quot; psdEmbedColorProfile=&quot;true&quot; psdLayers=&quot;true&quot; psdMaximizeCompatibility=&quot;true&quot; flattenImage=&quot;false&quot; psdBPC=&quot;16&quot;/>&#xA;      &lt;resizeOptions enabled=&quot;false&quot;/>&#xA;      &lt;action enabled=&quot;false&quot; when=&quot;Before Image Resize&quot; set=&quot;Default Actions&quot; name=&quot;Sepia Toning (layer)&quot;/>&#xA;      &lt;namingOptions startingSerial=&quot;1&quot;>Name,lowerCaseExtension&lt;/namingOptions>&#xA;    &lt;/task>&#xA;  &lt;/taskList>&#xA;  &lt;preferences>&#xA;    &lt;preserveFileName>false&lt;/preserveFileName>&#xA;  &lt;/preferences>&#xA;  &lt;uiPrefs>&#xA;    &lt;lastX>300&lt;/lastX>&#xA;    &lt;lastY>111&lt;/lastY>&#xA;    &lt;lastSettingsFile>C:\Users\jjmac\AppData\Roaming\PamSlideShow.xml&lt;/lastSettingsFile>&#xA;    &lt;lastInputFolder>~/Desktop/ImageSource/obj0&lt;/lastInputFolder>&#xA;    &lt;lastOutputFolder>C:\Users\jjmac\Desktop\ImageSave&lt;/lastOutputFolder>&#xA;  &lt;/uiPrefs>&#xA;  &lt;date>2020-07-18T16:43:12&lt;/date>&#xA;  &lt;version>3.2b5&lt;/version>&#xA;&lt;/ImageProcessorProSettings>"/>
          <DescValueType.STRINGTYPE key="1299408741" id="1299408741" symname="Message" sym="Msge" string="Settings for Image Processor Pro"/>
        </ActionDescriptor>
      </ActionItem>
    </Action>
    <Action key="4" name="Png Versions" expanded="true" count="1">
      <ActionItem key="TEXT" expanded="false" enabled="true" withDialog="false" dialogOptions="0" identifier="TEXT" event="611736f0-9c46-11e0-aa82-0800200c9a66" name="" hasDescriptor="true">
        <ActionDescriptor key="611736f0-9c46-11e0-aa82-0800200c9a66" count="2">
          <DescValueType.STRINGTYPE key="2965" id="2965" symname="ImageProcessorProSettings" sym="2965" string="&lt;ImageProcessorProSettings>&#xA;  &lt;input source=&quot;currentImage&quot;/>&#xA;  &lt;output path=&quot;same&quot; subfolder=&quot;false&quot; keepStructure=&quot;false&quot; retainOriginal=&quot;true&quot;/>&#xA;  &lt;taskList>&#xA;    &lt;task enabled=&quot;true&quot; subfolderName=&quot;Set 1&quot; colorProfile=&quot;sRGB IEC61966-2.1&quot;>&#xA;      &lt;saveOptions fileSaveType=&quot;png&quot; pngInterlaced=&quot;false&quot; saveForWeb=&quot;false&quot;/>&#xA;      &lt;resizeOptions enabled=&quot;false&quot;/>&#xA;      &lt;action enabled=&quot;false&quot; when=&quot;Before Image Resize&quot; set=&quot;Default Actions&quot; name=&quot;Sepia Toning (layer)&quot;/>&#xA;      &lt;namingOptions startingSerial=&quot;1&quot;>Name,lowerCaseExtension&lt;/namingOptions>&#xA;    &lt;/task>&#xA;  &lt;/taskList>&#xA;  &lt;preferences>&#xA;    &lt;preserveFileName>false&lt;/preserveFileName>&#xA;  &lt;/preferences>&#xA;  &lt;uiPrefs>&#xA;    &lt;lastX>300&lt;/lastX>&#xA;    &lt;lastY>111&lt;/lastY>&#xA;    &lt;lastSettingsFile>C:\Users\jjmac\AppData\Roaming\PamSlideShow.xml&lt;/lastSettingsFile>&#xA;    &lt;lastInputFolder>~/Desktop/ImageSource/obj0&lt;/lastInputFolder>&#xA;    &lt;lastOutputFolder>C:\Users\jjmac\Desktop\ImageSave&lt;/lastOutputFolder>&#xA;  &lt;/uiPrefs>&#xA;  &lt;date>2020-07-18T16:44:54&lt;/date>&#xA;  &lt;version>3.2b5&lt;/version>&#xA;&lt;/ImageProcessorProSettings>"/>
          <DescValueType.STRINGTYPE key="1299408741" id="1299408741" symname="Message" sym="Msge" string="Settings for Image Processor Pro"/>
        </ActionDescriptor>
      </ActionItem>
    </Action>
  </ActionSet>
</ActionFile>
JJMack

Likes

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
Reply
Loading...
Oct 07, 2020 0
JJMack LATEST
Most Valuable Participant ,
Oct 07, 2020

Copy link to clipboard

Copied

The Image processor pro dialog is very complex and may work if you change  the action to ~/Downloads/...

Do While my Collage scripts are not plug-ins o will not record dialog settings their dialogs  lets you select template or enter the templates path.  If I select a psd template  the script will see C:\Users\MyUserID\Desktop\filename.psd.  However, I can  type in the path instead of selecting the psd and enter ~/Desktop/filename.psd and the script will open the PSD. Scripts  have no problem with that syntax

Capture.jpg

JJMack

Likes

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
Reply
Loading...
Oct 07, 2020 0