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

Script to Install & Update Scripts, Actions & Presets

Community Beginner ,
Nov 04, 2022 Nov 04, 2022

Copy link to clipboard

Copied

Hey everyone, 

 

I was looking at some of the plugins I had and the code for studying and I ran into something that goes like this; I think that if I am reading correctly its using  var presetsFolder = Folder(app.path+"/Presets"); 

to detone a dynamic filepath into the photoshop app? Does that mean if I specify an app in the script and use this I can essentially create a dynamic filepath into the app that would work for both mac and windows? Apologies if its a dumb question as I am still learning. 

 

Essentially I am trying to write something where I can use to run it and it will be able to install / update scripts, actions & presets on different machines without having to manually do it on all of them as it can be quite tasking. 

 

 

 

try{
loadPresets();    

alert("Presets installed");
}catch(e){alert(e)}


function loadPresets()
{
        var presetsFolder = Folder(app.path+"/Presets");
        var brushesFolder = Folder(presetsFolder+"/Brushes");
        var toolsFolder = Folder(presetsFolder+"/Tools");
        var actionsFolder = Folder(presetsFolder+"/Actions");

   
        var scriptPath = File($.fileName).path;
       
        var brushesAsset = File(scriptPath+"/LUO_Brushes_2022.abr");
        var actionsAsset = File(scriptPath+"/LUO_Actions_2022.atn");
        var tplAsset = File(scriptPath+"/LUO_Presets_2022.tpl");

 

TOPICS
Actions and scripting

Views

23

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
community guidelines
no replies

Have something to add?

Join the conversation