Script to save as tif with compression zip, file properties
I don't know anything about scripting so that I cannot understand the answers to similar questions and merge a response to mine.
I'm looking for a script to save my images as tiff with zip compression using the title of the Document in the file properties.
I want to assign it to a button to save me time, images of scanning takes enough time as it is
Thanks in advance for any help.
If the file exists, this will add the time so it will be a different file name.
#target photoshop;
main();
main() {} function
var Path = Folder("/D/Scanned");
If (!.) Path.Exists) {}
Alert (path + "does not exist!");
return;
}
var fileName = activeDocument.info.title;
if(FileName == '') {}
Alert ("there is no title in the present document);
return;
}
var saveFile = file (path + "/" + name + ".tif");
If (SaveFile.Exists) saveFile = file (path + "/" + fileName + "-" + time() + ".tif");
SaveTIFF (saveFile);
app.activeDocument.close (SaveOptions.DONOTSAVECHANGES);
};
function SaveTIFF (saveFile) {}
tiffSaveOptions = new TiffSaveOptions();
tiffSaveOptions.embedColorProfile = true;
tiffSaveOptions.alphaChannels = true;
tiffSaveOptions.layers = true;
tiffSaveOptions.imageCompression = TIFFEncoding.TIFFZIP;
activeDocument.saveAs (saveFile, tiffSaveOptions, true, Extension.LOWERCASE);
};
time() {} function
var date = new Date();
var d = date.getDate ();
var day = (d< 10)="" '0'="" +="" d="" :="">
var m = date.getMonth () + 1;
var month = (m< 10)="" '0'="" +="" m="" :="">
yy var = date.getYear ();
var year = (yy< 1000)="" yy="" +="" 1900="" :="">
var digital = new Date();
var h = digital.getHours ();
var minutes = digital.getMinutes ();
var seconds = digital.getSeconds ();
var amOrPm = "AM";
If (hours > 11) amOrPm = 'H ';
If (hours > 12 hours) = UH - 12.
If (hours == 0) hours = 12;
If (minutes<= 9)="" minutes="0" +="">=>
If (seconds<= 9)="" seconds="0" +="">=>
todaysDate = hours + "-" + minutes + "-" + seconds + amOrPm;
Return todaysDate.toString ();
};
Tags: Photoshop
Similar Questions
-
Spotlight search in compressed .zip files
I was told that Mac, including users with the Mavericks can search files in compressed .zip files. I had an experience of zip files using the 'Compress' command of the Mac, then threw the original uncompressed files and emptied the Recycle Bin. Spotlight can't find the files in the compressed files that remain.
I'm wrong about this capability in the spotlight?
I don't see no settings of Spotlight preferences to choose the files compressed with an archive.
Return to what you have enabled in system preferences: Spotlight: categories of search results. All mine are checked. Although I no longer run Mavericks, I know let me see inside Pages and MS Word .docx documents words (both zipped, renamed containers), and I could also see unique words within other documents zipped. I had all my categories Spotlight search Resutls checked in Mavericks and this continues in El Capitan.
-
As above,.
It didn't work for a long time, IV ' e trying since age to find an answer, I had no luck so far.
It would be better to download another one from somewhere, if so where?Hello Bazzer49,
Welcome to the forum!
Here are some questions that will help us give you a better answer:
When the .zip file doesn't work, what happens? (actually never open, is open but it is empty, ect.)
Do you get any error messages?
Are you just trying to access what is inside or what you want to do with the .zip file?
In the meantime, try these solutions provided by MVP Kelly Theriot:
Restore compressed folders Zippes Association!
http://www.kellys-Korner-XP.com/regs_edits/zip.reg
Restore default XP Zip Folders:
http://www.kellys-Korner-XP.com/regs_edits/restorezipfolder.reg
Can't wait to hear back on your part.
Steven
Microsoft Answers Support Engineer
Visit our Microsoft answers feedback Forum and let us know what you think -
I have a labtop CQ57 a couple of windows 7-64, I'm down loading video is a zip of music files but my compress zip file doesn't exsit more how can I get a zip file to get my music and videos [Compaq Presario CQ57-339WM laptop PC]
Hello
Please download this free product and install on your machine:
http://www.7-zip.org/download.html
Kind regards.
-
Java Script to save as PDF with password...
Hi people. My goal is to have a script to perform the following functions:
1. Enter the name of the active document
2 Save as PDF using the active doc name with password lock in the same directory the *.ai file is located
I started to play with the code, but I don't know what I'm doing... newbie.
Here's the code that I currently use.
var curDoc = app.activeDocument; var destFolder, sourceFolder, files, fileType, sourceDoc, targetFile, pdfSaveOpts; //var destName = "~/Desktop/Testpassword1.pdf"; var destName = targetFile saveFileToPDF(destName); //sourceFolder = Folder.selectDialog( 'Select the folder with Illustrator files you want to convert to PDF', '~' ); //saveFileToPDF(destName); //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ if ( sourceFolder != null ) { //files = new Array(); //fileType = '*.ai'; //fileType = prompt( 'Select type of Illustrator files to you want to process. Eg: *.ai', ' ' ); // Get all files matching the pattern //files = sourceFolder.getFiles( fileType ); if ( files.length > 0 ) { // Get the destination to save the files destFolder = Folder.selectDialog( 'Select the folder where you want to save the converted PDF files.', '~' ); for ( i = 0; i < files.length; i++ ) { sourceDoc = app.open(files[i]); // returns the document object // Call function getNewName to get the name and file to save the pdf targetFile = getNewName(); // Call function getPDFOptions get the PDFSaveOptions for the files //pdfSaveOpts = getPDFOptions( ); // Save as pdf sourceDoc.saveAs( targetFile, pdfSaveOpts ); sourceDoc.close(); } alert( 'Saved' + destFolder ); } else { alert( 'No matching files found' ); } } ///++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ function getNewName() { var ext, docName, newName, saveInFile, docName; docName = sourceDoc.name; ext = '.pdf'; // new extension for pdf file newName = ""; for ( var i = 0 ; docName[i] != "." ; i++ ) { newName += docName[i]; } newName += ext; // full pdf name of the file // Create a file object to save the pdf saveInFile = new File( destFolder + '/' + newName ); return saveInFile; } ///++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ function saveFileToPDF (dest) { var doc = app.activeDocument; if ( app.documents.length > 0 ) { var saveName = new File ( dest ); saveOpts = new PDFSaveOptions(); saveOpts.compatibility = PDFCompatibility.ACROBAT5; saveOpts.generateThumbnails = true; saveOpts.optimization = true; saveOpts.preserveEditability = true; saveOpts.bleedOffsetRect = [2,2,2,2]; saveOpts.trimMarks = true; //======================= COMPRESSION =========================== saveOpts.colorCompression = CompressionQuality.JPEGMAXIMUM; saveOpts.colorDownsamplingMethod = DownsampleMethod.BICUBICDOWNSAMPLE; saveOpts.colorDownsampling = 300; saveOpts.colorDownsamplingImageThreshold = 450; //----------------------------------------------------------------------------------------------------------- saveOpts.grayscaleCompression = CompressionQuality.JPEGMAXIMUM; saveOpts.grayscaleDownsamplingMethod = DownsampleMethod.BICUBICDOWNSAMPLE; saveOpts.grayscaleDownsampling = 300; saveOpts.grayscaleDownsamplingImageThreshold = 450; //----------------------------------------------------------------------------------------------------------- saveOpts.monochromeCompression = MonochromeCompression.CCIT4; saveOpts.monochromeDownsamplingMethod = DownsampleMethod.BICUBICDOWNSAMPLE; saveOpts.monochromeDownsampling = 1200; saveOpts.monochromeDownsamplingImageThreshold = 1800; //==================== END OF COMPRESSION ======================= saveOpts.colorConversionID = ColorConversion.COLORCONVERSIONREPURPOSE; saveOpts.colorDestinationID = ColorDestination.COLORDESTINATIONWORKINGCMYK; /// saveOpts = new PDFSaveOptions(); saveOpts.requirePermissionPassword = true; saveOpts.permissionPassword = "pink"; saveOpts.pDFAllowPrinting = PDFPrintAllowedEnum.PRINT128LOWRESOLUTION; doc.saveAs( saveName, saveOpts ); } }
-
How can I tell my computer to decompress a disc with a zip file and not with IE?
I have Vista and tried several things without success.
Hello
Make a Restore Point to use in case you make a mistake (which is normally not necessary).
How to create a Vista System Restore Point
http://www.Vistax64.com/tutorials/76332-system-restore-point-create.htmlIf you need later:
How to make a Vista system restore
http://www.Vistax64.com/tutorials/76905-System-Restore-how.html----------------------------------------------------------------------------------------
Follow these steps to restore the native support of Zip:
- Click on the Start Orb
Search regedit - Click continue on user account control
- Go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.zip
- Click on the drop down arrow to the left of the file .zip
- Right-click on OpenWithList
- Click Remove
- Click Yes
- Right-click UserChoice
- Click Remove
- Click Yes
- Exit regedit
Your .zip files should now open with the native compression/decompression system that comes with Windows Vista.
If necessary, after the above - 1 3 here should fix you up
How to restore Vista built-in ZIP files Support
http://www.Vistax64.com/tutorials/65254-zip-file-support-restore.html
How to enable or disable the files compressed in Vista
http://www.Vistax64.com/tutorials/93827-zip-file-compressed-folders.html
Restore the Type Associations by default Vista file extensions
http://www.Vistax64.com/tutorials/233243-default-file-type-associations-restore.html---------------------------------
How Unassociate a Type of Extension file in Vista - and a utility to help
http://www.Vistax64.com/tutorials/91920-unassociate-file-extention-type.html
Restore and return the file Association in Windows Vista if Original
http://www.mydigitallife.info/2008/06/22/restore-and-reset-file-association-in-Windows-Vista-back-to-original-default/Reset and Fix Broken Windows Vista file Ext and Type Associations (include EXE, COM, SYS, ZIP, LNK,
Folder, drive)
http://www.mydigitallife.info/2008/06/22/reset-and-fix-broken-Windows-Vista-file-ext-and-type-associations-include-exe-com-sys-zip-lnk-folder-drive/For Windows Vista file association problems
http://www.Winhelponline.com/articles/105/1/file-association-fixes-for-Windows-Vista.htmlI hope this helps.
- Click on the Start Orb
-
Compression zip file missing link...
I create a zip file before you go to the link "send to" but now that the link is no longer there. Anyone know how to get that 'compress' link back?
interceptor110 wrote: this is not a program I installed. It comes with the computer - any computer, I thought. So, there is no program in Control Panel to uninstall. It belongs to 'my computer', in the libraries of the C drive. Thank you.
Hi interceptor110, sorry, I thought you had an application that allows you to work with zip files.
More recent versions of Windows has this ability. You can try to run a Restore Point Windows date back to the time before this error appeared, or you can try to restore windows files that have been corrupted or deleted.
I would suggest trying a Windows Restore Point.
To test this, go to the start ORB, all programs, accessories, System Tools, System Restore.
A small window should open and show some restore points (in days) that you can highlight and continue and the system should reboot and reinstall the important system files that may be missing or damaged.
When it is finished, you should see a message that windows has been restored to the date you have selected or that windows was not able to restore your system.
The other option is a little more complicated, if the Windows Restore Point does not work, you can try the opther option.
-
I followed the instructions on how to open the zipped files. Nothing works. I open file Explorer, but there is no menu, taking me to the compressed tools command and so I can't click extract all. I clicked on the home tab, as well as on the Properties, but the general tab does not give me the option opens with, File Explorer.
To do this, and ignore all the other answers:
Go to your control panel. Click programs (not uninstall a program, but the real link of programs). Under "default programs", you will see a link that says: "do a type of file always open in a specific program.
Form there, find the extension .zip file and click on it to highlight it, and then click File Explorer (I think that's it, now that I have fixed my I can't find .zip in the list more but you will know which program to choose when you see by the folder icon).
After that, you're golden!
Control custom Programs\Set Associations
-
Import a ' compressed zipped "file in Dreamweaver
Hello
Does anyone know how we understand a "Compressés Zippés" file in Dreamweaver? Is this possible?
Kind regards
Coxdabd.>
> Anyone know how we understand a "Compressés Zippés" file in
> Dreamweaver? Is this possible?You want a link to a file .zip for people to download?
Then:
1, move or copy the .zip file to the folder of Site Local to this site.
2, make a link to the .zip file.
3, download the page with the link AND download the .zip file using the files
Panel and put it to the remote server. -
How extract/decompress a file/picture of the compressed/zipped file?
How extract/decompress a file/photo that I zipped? Whenever I try to watch the photo im says that the player does not support the codec used to compress the file?
Use the same zip program to unzip the file that you used to zip.
You can also see one of them, depending on your version of Windows:
http://Windows.Microsoft.com/en-GB/Windows7/compress-and-uncompress-files-ZIP-files
http://Windows.Microsoft.com/en-us/Windows-Vista/compress-and-uncompress-files-ZIP-files
After having unpacked (the file decompression) try to view the picture again.
-
Problem reassociating with correct .zip files
By mistake, I opted to open a .zip with the itunes application file and now all my zip files are using this application. How to re-associate the format .zip with the correct program?
Hi limited talent,
Run the Microsoft Fixit and/or try the steps from the following link and check if it helps:
Diagnose and repair Windows files and folders problems automatically
I hope this helps. -
need help with reading ZIP files.
Dear windows team
I am self-taught on the computer and I am a 55yo.
I have Aproblem... .i don't know how to read ZIP files... .everytime I try to get to the one just saying my computer doed not support... I tried to download a free access, but then nothing happens...: (.. .the it in is the same with RAR files when I want to watch some movies.. .please could you help me should I download for free on internet... .i understand if you can't help to be honest I'm computer illiterate)
Kind regards...
Mario
Hello
In the case of zip files, you can right and select extract files to get all the files extracted using File Explorer. For RAR files, you can try 7 - zip:
http://www.7-zip.org/download.html
Hope that answers your query :)
-
Problems with my compressed zip files.
Every time I have inserted my USB and open a folder with files compressed in zip. I get the message, "Please insert the last disc of the multi volume set and click OK to continue." What does this message and how to fix it? Help, please
Hey Tbeaston,
Welcome to the community!
This can occur when AutoPlay is configurΘ for dΘmarrer a USB drive when inserted. You can stop this action temporarily by holding down the SHIFT key when you insert the disc, or you can change the options for automatic execution of the Set Program Access and Defaults option in the Start Menu.
Hope that helps, I look forward to hearing from you.
Steven
Microsoft Answers Support Engineer
Visit our Microsoft answers feedback Forum and let us know what you think -
My operating system is Windows 7.
How to remove and restore the default context Menu items 'New' in Windows 7 and Windows 8
http://www.SevenForums.com/tutorials/28677-new-context-menu-remove-restore-default-menu-items.html
If still no joy, see the 'response' by Linda Yan in this thread.
http://social.technet.Microsoft.com/forums/en-us/w7itprogeneral/thread/97de8a2a-12f2-4381-A409-a78f4ae551cf/#99395761-56de-4a76-8C2A-eab498ad735a
Tip: When you save the text in Notepad, the default file format is .txt. Replace all files.
-
How can you save the original with the catalog file file after edit
OK I'll try boarding.
First of all, I shoot a game... According to 600 photos. Import the game in lightroom, I mark the photos I want and delete the catalog. I edit and rename and export the files I want the game. say 300 photos.
My question is; After saving the 300 photos in the catalogue how match the original photos with those exported if they match.
I think that the best answer is to change your workflow.
I never export photos except for a specific purpose (e-mail, web, print), and then after that I used the photos exported, I remove the exports. I do not export them just to have sitting around on my hard drive for some whose use is more later. In this way, the photo is still available in Lightroom, and if you want this photo retouched, you go into Lightroom and find and export as required. It is not question to match to originals with exported given that you do not keep the exported photos once they have served their purpose (e-mail, web, print).
Maybe you are looking for
-
How can I reinstall my computer on a new Thunderbird email addresses?
I have a new computer and was able to install all my other files but I can't "find" my email addresses ofmy old account to thunderbird. Help!
-
700 - 500Z envy: you can use a HP Officejet J4580 all-in-One with a 700-500Z envy
I just bought an Envy700-500Z. Very happy. But I was printing on a laptop Toshiba with a HP Officejet J4580 all-in-one printer. My question is can I use officejet j4580 on Envy with hpeprint?
-
How to code a batch file to put in the form of z: drive?
I would like to drive Z: quick format and xcopy in D: drive in the Z: drive for backup. I would like to pass on any message entry also. Anyone have any suggestions on how to code a batch file for this? Thanks for all the suggestions
-
who can I find volume control mixer?
the volume icon is not displayed in the taskbar on the right side of my p/c? Please help so I can see it and some difficulty in the mixer. Thank you reconuu Lee E-mail address is removed from the privacy *.
-
How to watch a movie on your computer on your TV?
Some said I could do it and I don't have any idea how if this is true I would be grateful someone tell me how to do this.