Copy link to clipboard
Copied
Trying to run "ExportFlexSkins.jsx". Seems to run as expected - I choose a destination folder, then the batch begins. Seems like as PS is trying to save each individual asset I get the "could not complete the action, since the destination folder does not exist" error. For EVERY Asset in the PSD. This is fresh install of CS5 - with recent downloaded PS Flex skinning files. Although I don't think they've been updated since 2007. This is a productivity killer for me - anyone else have this issue?
FYI The Flex skinning templates can be dl here: http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex_skins. My problem is the Photoshop script "ExportFlexSkins.jsx"
Message was edited by: ben_northern
Copy link to clipboard
Copied
Having the exact same problem, did you find a patch?
Copy link to clipboard
Copied
I had a look at the script ExportFlexSkins.jsx and I think the problem may be with OS permissions. The script creates a folder named 'assets' in the selected folder. However it doesn't check to see if the folder was actually created, just assumes it was. Depending on the OS and folder selected the script may not be able to create the subfolder.
At least that is my guess as the script works fine for me on WinXP.
You could add a check to make sure the subfolder was created near the top of exportChildren()
var tempFolder;
tempFolder = new Folder (folder + "/assets/");
if(! tempFolder.create() ){
alert( 'Unable to create assets subfolder in '+decodeURI ( folder ) );
return;// don't try to export
}
Copy link to clipboard
Copied
What Michael wrote struck some of my scripts when I installed my script on a new machine that had Windows 7 on it. I had copies some code from someone script that saved some of its Dialog parameters. It did so by finding out where the script was installed and created subdirectory for its dialogs parameters. This failed under windows 7 because of permmisions. It also was not that good of and idea it there were more the one user using the machine for all users parameters would overwrite each others. So I change the locations to be in the users data application tree for example "Users\User ID\Application Data\JJMack's Scripts\Collage". It would not surprise me if more scripts start to fail when more user install Windows 7 where permissions more restrictive.
Copy link to clipboard
Copied
This is the function that I use to determine which folder to use when I need to store preferences, settings, or log files. This works for any version of PS but Folder.userData may not have been added until CS or CS2.
function getPreferencesFolder() {
var userData = Folder.userData;if (!userData || !userData.exists) {
userData = Folder("~");
}var folder = new Folder(userData + "/xtools");
if (!folder.exists) {
folder.create();
}return folder;
};
-X
Copy link to clipboard
Copied
hi,
i don't know if i integrate your code correctly, but it doens't work for me. I presently create skin for client and this plugin is really usefull for me.
i use win7 64bit home edition, and photoshop cs5
there is how i integrate this :
// EDIT ALEX GRENIER function getPreferencesFolder() { var userData = Folder.userData; if (!userData || !userData.exists) { userData = Folder("~"); } var folder = new Folder(userData + "/xtools"); if (!folder.exists) { folder.create(); } return folder; }; function exportChildren(dupObj, orgObj, dupDocRef, folder) { if (getCSVersion() >= 10) // CS3 Only { // Create assets folder in Flex app's directory // var tempFolder; // tempFolder = new Folder (folder + "/assets/"); // tempFolder.create(); // EDIT ALEX GRENIER var tempFolder; tempFolder = getPreferencesFolder();
i put the code creating the folder in comment and put your code in place, i also put your function before the function creating file.
With the base code (without modification) photoshop is able to create my folder assets, but when it try to export the png, it export nothing, so i have a empty folder.
thank you,
Alex
Copy link to clipboard
Copied
Anybody know how integrate the code?
Thanks.
Regards,
Alex
Find more inspiration, events, and resources on the new Adobe Community
Explore Now