Save all Open Files in CS4?
Hi all,
Looking for a script that will save all open files as a a JPG to a specific directory. I tried using this in CS4 but it doesnt work. It just opens the save dialog and thats it. Want something a bit more automated:
var tempFolder = new Folder ("C:/Your_Temporary_Folder")
tempFolder.create();
var DL = documents.length;
for(a=1;a<=DL;a++){
activeDocument = documents[a-1];
var AD=activeDocument;
var imgName= AD.name;
imgName = imgName.substr(0, imgName.length -4);
AD.flatten();
saveFile = new File("C:/Your_Temporary_Folder/"+imgName+".jpg");
saveOptions = new JPEGSaveOptions();
saveOptions.embedColorProfile = true;
saveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
saveOptions.matte = MatteType.NONE;
saveOptions.quality = 12;
AD.saveAs(saveFile, saveOptions, true,Extension.LOWERCASE);
Thanks.
Hi guys,
That fixed it. The other problem was that the name length was too short:
imgName = imgName.substr(0, imgName.length -0);
So I corrected that as well. Thanks for your help.
Is it possible to add a "close without prompting to save" in the script? So it basically saves the file then closes the window in PS without prompting me to save it again?
Similar Messages
-
Is there a way or a script to save all open files in Adobe Illustrator?
ThanksThanks. How would one edit this, especially so that it doesn't close the files?
Do I just delete the 4th line from the bottom?
var WR="WR-SaveAndCloseAll v0.2\n\n";
if (language == "de") {
var MSG_nodocs = WR+"Kein Dokument ge\xF6ffnet.";
var MSG_ask = WR+"Sollen alle Dokumente gespeichert und geschlossen werden?";
} else {
var MSG_nodocs = WR+"You have no open document."
var MSG_ask = WR+"Are you sure to save and close all open documents?";
var itemstoprocess=0;
var error=0;
var Docs=documents.length;
if (Docs<1) {
error++;
alert(MSG_nodocs);
} else {
if(confirm(MSG_ask)) {
for(var i=0;i<Docs;i++) {
activeDocument.close(SaveOptions.SAVECHANGES); -
How to save all open files IE like a shortcut or alias to them.
Hi everyone,
I know there must be a way to do this in Dreamweaver, but I
can't find it.
When I am working on a series of pages (for example, 3 or 4
pages with a bunch of include pages) and I want to save a shortcut
or alias that would re-open them all for me (like the "Bookmark All
Tabs" option in Firefox that will save all the open tabs so you can
open them all at once later).
This will save a TON of time, instead of me writing down
every single page name, and then, opening them all by hand later.
I know you can use the Site Navigation, to see the files, but
that runs sooooo slooooowwwww.
I appreciate the help in advance,
Regards,
Donyeah, i can definitely see how it would be useful for some
people! and
hey, for all i know, i'm the one who's not an average user. i
was
pretty much just saying that i can see how that's something
Firefox
would think to do, but not necessarily a program like
Dreamweaver. but i
agree that it would be a useful feature in lots of programs.
and i think
that what Murray suggested is probably pretty close to what
you're
looking for, if not exactly.
d_macman wrote:
> To respond to both...
>
> courtney (n h c)... I must not be the average user then.
We have many sites,
> and I do a LOT of development, and many times, I may
have several pages with
> several includes on a page. IE, for a form page, I may
have 10-12 pages total
> (including headers, footers, java, PHP process pages,
etc) and to work out the
> processes and for development, I may create several
versions depending on the
> problems I run into.So to not go nuts, I would LOVE to
save the batch of pages
> out, and then be able to re-open them all at once.
Making it easy to jump in an
> out of a test section (I have them saved in a site, and
dont want to make
> second sites just for this purpose).
>
> Not to mention, leaving work and coming back in and
finding out the power went
> out over the weekend and my machine shutdown (and yes, I
have a UPS, but it
> wont run the system for that long).
>
> So, you see why I would like to save them as batch, like
Firefox, way easier.
>
> Murray *ACE* ...
>
> I will try that, I did not even know that was there. Way
cool ! I hope it
> works, especially for power outages, like I mentioned
above!
>
> Thanks all,
>
> Don
>
> -
Close ALL open files and save jpg with jpg option
Hi,
I have some (a lot) of -jpg images to crop, and resize, while I have to do this one by one based on what portion of the image to crop, once done I need to close, and save them.
To speed up the process I open several files, and do the crop&resize, and when finished I use "close all", and would like to avoid to confirm the "save" dialogue, and the "jpeg options" "image quality option" dialogue, having to say save, and the option set to a given value.
Unfortunatelly I am not a coder, and didn't understand anything from the Javascript Scripting Reference guide.
I found this
app.docRef.close(SaveOptions.SAVECHANGES);
here, I pasted it into ExtendScript, saved it, but when opening the script from file > scripts > browse it returns error 21 (undefined is not an object)
Will you please kindly give me the script?
Thank youAdd this snippet to a script file.
Load script file in PS scripts folder
Restart photoshop
Assign keyboard shortcut to script
#target photoshop
//Make Photoshop the formost Appplication
app.bringToFront();
// Requires at least one open document
while (app.documents.length > 0)
//Save all open windows
{activeDocument.close(SaveOptions.SAVECHANGES);} -
I didn't find this when I did a forum search, but I find it hard to believe that there isn't a feature request for this already. Photoshop needs a "Save All" feature. I've seen suggestion to just make this an action, but the problem with that is that you must continually hit the action in order to perform it. Maybe I'm just missing something but I find it odd that a photo editing program, in which it is quite possible that you could have dozens of images open at the same time has no "Save All" or "Autosave" features...still.
If you want to give it a try paste the following text into a new file in ExtendScript Toolkit (part of Photoshop’s installation, Applications/Utilities/Adobe Utilities - CS5/ExtendScript Toolkit CS5) and save it as a jsx-file into Photoshop’s Presets/Scripts-folder.
After restarting Photoshop the Script should be available under File > Scripts and can be assigned a Keyboard Shortcut directly, recorded into an Action, (in CS4 and CS5) be used in a Configurator-Panel or started from ExtendScript Toolkit directly.
// save all open documents;
// 2011, use it at your own risk;
#target photoshop;
if (app.documents.length > 0) {
var theFirst = app.activeDocument;
var theDocs = app.documents;
// psd options for unsaved files;
psdOpts = new PhotoshopSaveOptions();
psdOpts.embedColorProfile = true;
psdOpts.alphaChannels = false;
psdOpts.layers = true;
psdOpts.spotColors = true;
// go through all files;
for (var m = 0; m < theDocs.length; m++) {
var theDoc = theDocs[m];
app.activeDocument = theDoc;
// getting the name and location;
var docName = theDoc.name;
// thanks to xbytor for the regexp;
if (docName.indexOf(".") != -1) {var basename = docName.match(/(.*)\.[^\.]+$/)[1]}
else {var basename = docName};
// getting the location, if unsaved save to desktop;
try {
var docPath = theDoc.path;
// save the file if unsaved;
if (theDoc.saved == false) {theDoc.save()}
// if file has not been saved yet save to desktop;
catch (e) {
var docPath = "~/Desktop";
theDoc.saveAs((new File(docPath+'/'+basename+".psd")), psdOpts, false, Extension.LOWERCASE);
app.activeDocument = theFirst; -
Applescript to save all open documents?
Hello,
When I close Numbers, I usually have about 15 documents with changes and I have to go through "Do you want to save changes" for all of them.
I've googled and tried, without success, to get a script that saves all open documents, except for untitled ones.
Is there anyone who know such a script?
FredHere is a revised version.
The problem was due to the fact that the script save and close the documents.
When I tested it, it was only saving them.
--[SCRIPT save&backup4iWork]
Enregistrer le script en tant que Script : save&zip4iWork.scpt
déplacer le fichier ainsi créé dans le dossier
<VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:
Aller au menu Scripts puis choisir “save&zip4iWork”
Tous les documents iWork ouverts, ayant déjà été enregistrés puis modifiés seront enregistrés et fermés.
Si la propriété avecSauvegarde a la valeur true, une copie horodatée de chaque fichier est créée.
Si le document principal est de type paquet, la copie est compressée (zip).
--=====
L’aide du Finder explique:
L’Utilitaire AppleScript permet d’activer le Menu des scripts :
Ouvrez l’Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
Cochez la case “Afficher le menu des scripts dans la barre de menus”.
Sous 10.6.x,
aller dans le panneau “Général” du dialogue Préférences de l’Éditeur Applescript
puis cocher la case “Afficher le menu des scripts dans la barre des menus”.
--=====
Save the script as a Script: save&zip4iWork.scpt
Move the newly created file into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
Go to the Scripts Menu then choose “save&zip4iWork”
Every open iWork document already saved then edited will be saved and closed.
--=====
The Finder’s Help explains:
To make the Script menu appear:
Open the AppleScript utility located in Applications/AppleScript.
Select the “Show Script Menu in menu bar” checkbox.
Under 10.6.x,
go to the General panel of AppleScript Editor’s Preferences dialog box
and check the “Show Script menu in menu bar” option.
if the property avecSauvegarde is set to true, a dateTime stamped copy of each document is also created.
It's zipped if the main document is a package.
Yvan KOENIG
based on my AutoSave script.
2011/06/09
--=====
property avecSauvegarde : false
true = keep a dateTime stamped copy
false = don't keep a dateTime stamped copy
property saveKeynote : false
property saveNumbers : true
property savePages : false
--=====
on run
if savePages then my auto4PKN("Pages")
if saveKeynote then my auto4PKN("Keynote")
if saveNumbers then my auto4PKN("Numbers")
end run
--=====
on auto4PKN(theApp)
local titres, theDocs, aDoc, aPath
tell application "System Events" to set titres to title of processes
if theApp is in titres then
tell application theApp
As we close the documents, we must store the list of docs in a variable
or scan the list from the end which would require an index !
set theDocs to every document
repeat with aDoc in theDocs
if modified of aDoc then
set aPath to path of aDoc
try
set aPath to aPath as text
on error
Here if the document was never saved before
set aPath to ""
end try
if aPath is not "" then
Save and close documents which were already saved once
close aDoc with saving
if avecSauvegarde then my zipIt(aPath)
end if -- aPath
end if -- modified
end repeat
end tell -- theApp
end if -- theApp is…
end auto4PKN
--=====
on zipIt(fichier) (* fichier is an HFS path*)
local Nom, ext, dossier, isPackage, nomAvecDateHeure, source, dest
set fichier to "" & fichier
tell application "System Events" to tell disk item fichier
set Nom to name
set ext to name extension
set dossier to path of container
set isPackage to package folder
end tell
set source to quoted form of POSIX path of fichier
set nomAvecDateHeure to (text 1 thru -(2 + (count of ext)) of Nom) & (do shell script "date +_%Y%m%d-%H%M%S.") & ext
if isPackage then
set dest to quoted form of POSIX path of (dossier & nomAvecDateHeure & ".zip")
do shell script "ditto -ck " & source & " " & dest
else
set dest to quoted form of POSIX path of (dossier & nomAvecDateHeure)
do shell script "cp " & source & " " & dest
end if
end zipIt
--=====
--[SCRIPT]
--{code}
I included your specific requirements.
Yvan KOENIG (VALLAURIS, France) jeudi 9 juin 2011 18:03:20
iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
Please : Search for questions similar to your own before submitting them to the community
To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer ! -
How do I save all mp3 files as an attachable audio file in text messaging on a G'z One Commando? Some mp3 save as these types of files but I don't how or what I do differently.
In summary, it sounds to me as though the Mac concept of "hidden extension per file" isn't embraced at all by Photoshop.
So assuming the extension is always visible, what is the easiest way do each of the following (ignoring issues with integration with other apps):
1. Save a JPEG as: abc.jpg
2. Save a JPEG as: abc
3. Save a JPEG as: abc.
4. Save a JPEG as: abc.xxx
Since it seems to me we still haven't nailed down whether there's a disparity between how this works on Photoshop for Mac vs. PC, I'll answer the above questions for PC:
1. File - Save As, choose Format: JPEG, type (replace filename with): abc
2. No difference than 3 on a PC.
3. File - Save As, choose Format: JPEG, type: abc.
4. File - Save As, choose Format: JPEG, type: abc.xxx
How is it different from the above on a Mac?
Is there something more complex, such as the sequence of operations, or another system setting, that I didn't cover here? I normally always keep Explorer set so that file extensions are visible (it's global on a PC).
-Noel -
Can't save-All-relative files and don't see check_cs5.css under tab index.html
after closing check_cs5.css in the second tutorial I was suppose to get two tabs (source and check_cs5.css) which I could click on (underneath the index.html document tab). I don't see these. I can't get both the Design window AND the check_CS5.css code window. I only get the code for index.html and the design window. For some reason when I was suppose to save "all-relative-files" ... that was grayed out so I "saved ALL". I don't know why that was but it probably had something to do with the problem I just mentioned. This occurred near the end of tutorial 2 of the beginner tutorial.
DaveThis post seems to be the contuation of an earlier conversation but I don't know which earlier thread you're referring to.
Which tutorial are you doing?
Was this thread yours or someone totally different?
http://forums.adobe.com/thread/862565?tstart=0 -
Unable to save or open files in Excel from Office 2011 on my Mac Air with Mountain Lion?
Excel 2011 no longer saves or opens files?
I found this page under Microsoft's web area listing known issues with Excel 2011 on the Mac.
One is entitled "You cannot save a file that includes a hyperlink". That and/or other references on this page might be helpful.
http://mac2.microsoft.com/help/office/14/en-us/word/item/4ba243ae-1afa-4283-ba6a -d2a020dcc07a -
How to save all open document in png 24 by javacsript
how to save all open document in png 24 by javacsript
yeah, i can definitely see how it would be useful for some
people! and
hey, for all i know, i'm the one who's not an average user. i
was
pretty much just saying that i can see how that's something
Firefox
would think to do, but not necessarily a program like
Dreamweaver. but i
agree that it would be a useful feature in lots of programs.
and i think
that what Murray suggested is probably pretty close to what
you're
looking for, if not exactly.
d_macman wrote:
> To respond to both...
>
> courtney (n h c)... I must not be the average user then.
We have many sites,
> and I do a LOT of development, and many times, I may
have several pages with
> several includes on a page. IE, for a form page, I may
have 10-12 pages total
> (including headers, footers, java, PHP process pages,
etc) and to work out the
> processes and for development, I may create several
versions depending on the
> problems I run into.So to not go nuts, I would LOVE to
save the batch of pages
> out, and then be able to re-open them all at once.
Making it easy to jump in an
> out of a test section (I have them saved in a site, and
dont want to make
> second sites just for this purpose).
>
> Not to mention, leaving work and coming back in and
finding out the power went
> out over the weekend and my machine shutdown (and yes, I
have a UPS, but it
> wont run the system for that long).
>
> So, you see why I would like to save them as batch, like
Firefox, way easier.
>
> Murray *ACE* ...
>
> I will try that, I did not even know that was there. Way
cool ! I hope it
> works, especially for power outages, like I mentioned
above!
>
> Thanks all,
>
> Don
>
> -
Older versions of Firefox allowed the user to save all open tabs to a folder in Bookmarks with one touch (not laboriously bookmarking each tab), so if Firefox did not remember your tabs when re-opening your browser after closing down for the night, you could at least re-open each tab if you'd been clever enough to save them to a Bookmarks folder. I still have my Bookmarked folders full of tabs from previous months, so I know I'm not imagining this useful Bookmark function.
I cannot find this function, Save All Tabs (I think that's what it was called,) under Bookmarks anymore.THANK YOU! So easy, now I feel stupid. ;)
Sorry, Firefox 4.0 is driving me nuts in many ways, this is just one of them. -
Good evening,
The question is: how can i save all my files included images and javascripts in one folder.
I know and see that there is a option sava all related files, but this option is gray (so i cant activate this option)
I guess that this will save exectly what i want or perhaps most of my whises.
But how come that this option is gray and how cant i resolve this problem, so i can use this option?
I hope that some one could help me out with this one, cause i am not the brightest in dreamweaver.
Cause is Indesign you would just activate save as package and done.
Kind regards and already many thanks.Your question is a bit confusing.
Is it that you have a site with files in various locations within the root, and now you want to save all those files within the same folder? Why? And if you do want to do this, I suppose you want to do it so that the links to the files would still work, right?
In DW's File panel, you could just one-by-one drag and drop all your files into a single folder - that will preserve the linkages between these files.
The save all related files function will only save the files back to the location they were in when you created the link.
But I have a strong suspicion that we are not talking about the same thing.... -
I have the script partially working. It saves all the open psd as jpg into into a separate directory and it close some of the open files not all. The directory has five files. The script saves only three files, What am I doing wrong?
#target photoshop
if (app.documents.length > 0) {
//flatten the active document
app.activeDocument.flatten();
//jpeg options
var myJPEGOptions = new JPEGSaveOptions();
myJPEGOptions.embedColorProfile = true;
myJPEGOptions.formatOptions = FormatOptions.STANDARDBASELINE;
myJPEGOptions.matte = MatteType.WHITE;
myJPEGOptions.quality = 12;
myJPEGOptions.scans = 3;
// get documents;
var docs = app.documents;
for (var m = 0; m < app.documents.length; m++) {
app.activeDocument = docs[m];
try {
//save file to folder
var myFile = new File(("~/Desktop/forum-test") + "/" + activeDocument.name);
app.activeDocument.saveAs(myFile, myJPEGOptions, true);
//close the document
activeDocument.close(SaveOptions.DONOTSAVECHANGES);
catch (e) {
alert ("Error the script did not execute");This forum is about scripts in Acrobat. You need the Illustrator Scripting forum, I'm guessing.
-
Photoshop CS5.1 - Can't save or open file
This is an issue that randomly pops up and has been popping up for a while now (also in CS4 and CS5).
Basically I will be working in Photoshop and all of a sudden I cant save the file anymore. It opens up the dialog (if i do a "save as") but after a second or two it stops, leaving the file unsaved. After this point I can't even open any more files, the "file open" dialog box opens, but no documents.
If I have a document open during this time and try to edit a type layer, it will revert to the previous variant after I commit the changes.
I also can't do a drag&drop command from that point onward.
After I reboot, it starts working again ... until the next time "it" happens.
I have openGL turned off atm, same happens with it being turned on.
Running Win7 64bit, 4GB ram, wacom intuos 3, two monitors
All drivers are updated, but as I've said before, it's an
Please help!Everything is updated. No third party plugins are installed, just the adobe fonts are on this computer (did a fresh install cause of this issue).
Its weird because, I can't even use the free transform tool (it shows the bounding box, but I cant drag anything). Same with the text layers, can't make any permanent changes.
When I click on file/save nothing happens, file/save as opens up a dialog box, but then it's the same thing. -
Having trouble opening files in CS4
I am having a color management nightmare and that has lead to my trouble opening files, so I'll explain that color management part first.
I use Xrite Eye One Display Two as a calibration system and have recently bought a new Hewlet Packard 25 inch LCD monitor. Anyway, I am not seeing the same color outside of photoshop CS4 ext. that I see in photoshop CS4 ext. When I post a picture to the web, the color changes. I did read a post about this a few threads down, but my problem goes one step further. I changed some settings in the Save for Web section of photoshop and now I can't even open files from Bridge or directly from inside photoshop. Can anyone help me get back to just having problems with color? lol
I am quite the novice when it comes to certain things in adobe photoshop CS4, so thanks for any help or advice you could give me.Gotta love the way HP throws out that "72% Color Gamut" spec (e.g., on this page) without actually saying what color profile or standard it's the gamut of.
Color management is not something that can be easily explained in a paragraph. Since you're calibrating your monitor it is kind of important for you to understand what it's all about - and such understanding is possible with just a little effort and reading time. There are a lot of color management overviews online that can be turned up with a Google search.
No file showing up without any error message seems kind of weird. Are you using Windowed view or Tabbed view? I ask because I'm wondering if somehow the document is opening up off-screen. Do the entries in the Filter menu become active after such an open?
Does a document show up if you switch the Open Documents as Tabs setting in Edit - Preferences - Interface?
Have you installed any plug-ins that are supposed to provide access to any file types not available normally in Photoshop?
-Noel
Maybe you are looking for
-
Thanks for the help after looking over your sugesstion I did some additional troubleshooting which i should have done in the beginning and heres what i found Airport express is joined to and existing wireless network and i have internet access....all
-
SortcompareFunction is not working properly for more than 1 column in advanced datagrid
Hi Guys, I am using an advanced datagrid with groupingCollection. I have more than 1 grouped column. How ever I am using 2 sort compare function to sort date and time. The problem is when I am trying to sort date its workinf properly then when I jump
-
Distribute reports between users
Dears, I like to know if it's possible that a report created by user A, can be send by this user to another user B for example. So B can save the report in his own folder. It can be done by an administrator of course, but we want users to have this d
-
Lost all contacts after iOS 4.3 update [iPhone 4]
The description above pretty much tells it all. All contacts missing from iPhone 4 after update to iOS 4.3. All music, calendar, photos, voicemails are still there. And the strange thing (to me) is that the numbers are still there under "recent" and
-
Illustrator CS5 OSX 10.6.7 - Shift key not working properly.
The shift key no longer works as it should in illustrator ie. doesn't constrain proportions. I've searched around for this problem and none of the solutions have worked. I have tried restarting my mac; closing all applications and reopening Illustrat