Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

I need js global vars in PS-64bit CS6, but they aren't staying in memory.

$
0
0

I have read that global vars in Photoshop are only kept in memory if they are defined in a startup script, but I have found that the App Start event 'Ntfy' doesn't seem to qualify as a startup script in that sense. Through experimentation on my PC, I have found that a global variable defined in a script that is set in the Script Events Manager UI to run at App Start doesn't stay in memory. (Sorry that sentence is so long).

 

The other method of startup scripts, putting a script in C:\Program Files\Common Files\Adobe\Startup Scripts CS6\Adobe Photoshop, doesn't work for me.  The directory didn't exist, so I made it and put a simple script(var declarations and an alert() command) in it.  The simple script never ran because the alert window never popped up and the variables were never defined.

 

Since the document close event doesn't provide the name of the document that was closed, I need global vars to keep track of the open documents before and after the event.  I could use a file to save that data, but that is not the best solution.

 

Thanks for your help.


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>