Get path of the current script (from CS extension)

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

cobracobra

Get path of the current script (from CS extension)

Post by cobracobra »

Hi!

Does anybody know, is there a way to get the path to the jsx script when calling script of CS flash extension?
I tried
$.fileName and "catch( err ) { where = File(err.fileName); }"
all of them return the path to the root of Photoshop.exe

Thank you!

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

Mikeal.Sim

Get path of the current script (from CS extension)

Post by Mikeal.Sim »

Give this a try, this function has been popular on this forum:


Code: Select allscriptpath = whereAmI();

function whereAmI() {
   var where;
   try {var forcedError = FORCEDRRROR;}
   catch( e ) {where = File(e.fileName).parent;}
   return where;}
 
Mikeal.Sim

Get path of the current script (from CS extension)

Post by Mikeal.Sim »

oh, sorry I wasn't paying attention. I have no idea about flash.