@Js1212
Explorer
@Js1212
Explorer
Activity
Mar 04, 2025
05:43 AM
thank you....been going nuts trying to solve!!!!!
... View more
Oct 10, 2023
10:42 AM
need to change a bit on this script, specifically how it renames the color... currently it is just adding the suffix "_CMYK" to the color swatch but because the name currently is "COLOR_SPOT" it ends up becoming "COLOR_SPOT_CMYK". How can i change it to remove "_SPOT" and then append the suffix "_CMYK" so the new name will be "COLOR_CMYK" the existing color will always have "_SPOT" at the end of the swatch name //------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------- //current script.... //@target illustrator main(); function main() { var suffix = '_CMYK'; var isRmvSpot = true; // true of false var doc = app.activeDocument; var len = doc.spots.length; var isRgb = /rgb/i.test(doc.documentColorSpace); for (var i = 0; i <= len - 1; i++) { if (doc.spots[i].colorType === ColorModel.REGISTRATION) continue; var spotName = doc.spots[i].name; var spotValue = doc.spots[i].getInternalColor(); var sw = doc.swatches.add(); sw.name = spotName + suffix; var newColor = setColor(spotValue, isRgb); sw.color = newColor; } if (isRmvSpot && len > 0) doc.spots.removeAll(); } function setColor(arr, isRgb) { var color = isRgb ? new RGBColor() : new CMYKColor(); if (isRgb) { color.red = arr[0]; color.green = arr[1]; color.blue = arr[2]; } else { color.cyan = arr[0]; color.magenta = arr[1]; color.yellow = arr[2]; color.black = arr[3]; } return color; } //scott
... View more
Sep 12, 2023
10:58 AM
i posted a question earlier and Sergey Osokin was nice enough to assist (swatch type spot to CMYK) this time i need similar help to have a script that will change the swatch color MODE from CMYK to RGB thank you!!! scott
... View more
Sep 12, 2023
07:10 AM
tried a new document and it worked flawless....THANK YOU!!!!
... View more
Sep 12, 2023
06:33 AM
that worked great ....except it did not delete the original spot colors
... View more
Sep 12, 2023
05:44 AM
in the swatch panel i need the color type to change from Spot Color to Process color. It will have the global color unchecked and that is how it shoud remain. the name of the color in the swatches panel should change (if possible but not mandatory) to reflect that it is a process color by appending the existing color name with something like "_PROCESS" or "_CMYK"
... View more
Sep 11, 2023
12:55 PM
Also, i want to keep the color names but maybe tag the color _PROCESS (231_PROCESS)
... View more
Sep 11, 2023
12:41 PM
1 Upvote
I have a bunch of multi colored logos that i need to convert. they will come to me as spot colors does anybody have a script that will convert all spot colors in an illustrator doc to process... and after that i willl need to convert all process colors to RGB. scott
... View more
Jun 27, 2023
01:03 PM
1 Upvote
THANK YOU!!!!! scott
... View more
Jun 27, 2023
12:54 PM
thank you...and how to make the CMYK version?
... View more
Jun 27, 2023
12:20 PM
i need to two seperate scripts... 1 that will make a process color swatch and a second that will create a RGB swatch i have been using this to create my spot color swatch but i do not know what needs to be revised to make the two additional versions that i need try { var newSpot = app.activeDocument.swatches.getByName("SPOT 262"); alert("spot 262 already exists")} catch (e) { var newSpot = app.activeDocument.spots.add(); var newColor = new CMYKColor(); newColor.cyan = 52; newColor.magenta = 92; newColor.yellow = 12; newColor.black = 50; newSpot.name = "SPOT 262"; newSpot.colorType = ColorModel.SPOT; newSpot.color = newColor; var newSpotColor = new SpotColor(); newSpotColor = newSpot; newSpotColor.tint = 100; } //alert("done"); } as always, any help is appreciated scott
... View more
Jun 26, 2023
08:12 AM
thank you....that got me up and running!!!!
... View more
Jun 26, 2023
05:09 AM
...at first glance that is going right over my head....i am just beginning scripting and so far have just been modifying existing snippets that i have found and been stringing them together to get what i am trying to do. is there a simple solution? scott
... View more
Jun 26, 2023
04:01 AM
2 Upvotes
i dont know why but the attached snippet keeps saving my file (currently a .eps) as a .ai file. i need it to save out as a .eps. what do i need to change? // The active document var doc = app.activeDocument; // The path of the original document var originalDocPath = doc.path; // The name of the original document var originalDocName = doc.name; // Get just the file name. Ignore the file extension originalDocName = originalDocName.replace(/\.pdf|\.eps|_1c\.eps|\.ai/gi, "") // Save the active document as a .eps with _1C doc.saveAs(File(originalDocPath + "/" + originalDocName + "_1C.eps")); scott
... View more
Jan 04, 2023
12:06 PM
no,it is not working for me i have been running it from the scripts panel in indesign.....hmmmmmm
... View more
Jan 04, 2023
11:32 AM
still getting the same error....attached is screengrab of code i ran.... did i insert the address in the correct place?
... View more
Jan 04, 2023
10:54 AM
above i am referring to the short script at the very top by muppet mark and posted by pixxxel... Community Expert , May 10, 2014 Copy link to clipboard Searching the forum you can find examples like this (written by Muppet Mark): // OpenBrowserWithJavascript.jsx // siehe http://forums.adobe.com/message/4904789#4904789 openURL( 'www.google.com' ); function openURL( address ) { var f = File( Folder.temp + '/aiOpenURL.url' ); f.open( 'w' ); f.write( '[InternetShortcut]' + '\r' + 'URL=http://' + address + '\r' ); f.close(); f.execute(); };
... View more
Jan 04, 2023
10:41 AM
does the above script still work (this is a very old post) I need to open a particular website in safari from within a javascript i run in indesign. when i run the above script-Safari launchs but then a page that says "safari cant open page " "operation couldnt be completed" (see attached). i have changed the URL multiple times with same result
... View more
Jul 21, 2022
10:51 AM
I want to make a single PDF that can either be printed out OR filled out as a form online. when it is printed i want ruled lines for the end user to write on and when it is being filled out digitally i do not want the ruled lines. i found a script in an old forum that should do exactly what i want but either i am using it wrong or it no longer works (old forum post) here is the script that i found and tried to use... This has been a long time issue with many of the forms I have done for my clients.In almost all cases, it boiled down to the question why there were those writing lines, and the conclusion was that the lines were here to help the user write in their text. Now, if you fill out the form on screen, you don't need those guide lines at all, and the text is way more readable as well. So, we came to the conclusion that when the form is filled out on screen, we don't need those lines, and we treat each of these fields with the following Format script: if (event.value.toString().length > 0) { event.target.fillColor = color.white ; } else { event.target.fillColor = color.transparent ; } So, if the field is empty, the lines will show through, and the form can be printed and filled out manually. If the field is not empty, the lines will be covered up, and we don't have to worry about them anymore. can anybody let me know if the script no longer works or if i need a few tips on how to use it
... View more
Jun 03, 2020
07:16 AM
my coworkers think i am much smarter than i am... thanks to people like you!!!!
... View more
Jun 03, 2020
01:09 AM
I marked it as correct because it works great but.....If i could ask for one more little bit of help? how would i eliminate the alert ("alright")? I only want an alert if there is more than 31 but just pass thru if less than 31
... View more
Jun 03, 2020
12:32 AM
Thank you....I added an underscore to the acceptable list of characters (my designers like underscores) and it is working great!!!!!
... View more
Jun 02, 2020
10:03 AM
We have recently changed our server situation and was informed that we now must limit file names to 31 characters or less and no spaces or special characters allowed. I already have a script that i have all my designeres run when a file is finalized that i would like to incorporate this feature into. Does anybody have an existing script or snippet that will throw an alert if these conditions exist? scott
... View more
Mar 05, 2020
01:20 PM
Is it possible to convert the watermark to outlines? When my client attempts to place comments on the PDF to communicate edits to me they are unable to select the text of the document because they are selecting the watermark in front of the text they are indending on highlighting for edits. I am guessing if it is converted to outlines that would eliminate the problem because in the past i have placed a JPEG graphic of the word "PROOF" across the pdf and it was not selectable scott
... View more
Jan 22, 2020
08:50 AM
I think that worked!!!!! here is what i ended up with: //----------------------------------______LOW____-------------------------------------- //--------------------------pdf security export--------------------------------------------- if(app.documents.length>0){ var d=app.activeDocument; }; else{ alert(“Please open a document to execute export to pdf. Script will be aborted.”); exit(); } if(d.saved == false){ alert(“Save your document first before executing export to pdf. Script will be aborted.”); exit(); }; //---------------------------------------------- var dupPreset = app.pdfExportPresets.itemByName(‘[Smallest File Size]’).duplicate(); dupPreset.exportReaderSpreads = true; var currPrefs = app.pdfExportPreferences; with (currPrefs) { useSecurity = true; changeSecurityPassword = “Password”; acrobatCompatibility = AcrobatCompatibility.ACROBAT_7; viewPDF = true; pageRange = PageRange.ALL_PAGES; disallowPrinting = false; disallowCopying = true; disallowChanging = true; } var pdfPath = Folder.selectDialog(“Folder to save the LOW res pdf:”); var pdfName = d.name.substring(0, d.name.indexOf(“.”))+”_lr.pdf”; var userDefFileName = prompt(“File name:”,pdfName,undefined); if(userDefFileName == null){ exit(); }; var pdfFullName = pdfPath+”/”+userDefFileName; if(File(pdfFullName).exists){ c=confirm(“The PDF-file \””+userDefFileName+”\” is already existing. Do you want to overwrite it?”,true,undefined); if (c==0){exit()}; }; var doc = app.activeDocument; doc.exportFile ( ExportFormat.PDF_TYPE, File(pdfFullName), false, dupPreset ); currPrefs.useSecurity = false; dupPreset.remove();
... View more
Jan 22, 2020
07:31 AM
i'm afraid that you are now over my head. this is what i tried and it does not create spreads using the [Smallest FileSize] adobe supplied preset. I am sure i just bungled everything because i do not understand if(app.documents.length>0){ var d=app.activeDocument; }; else{ alert("Please open a document to execute export to pdf. Script will be aborted."); exit(); } if(d.saved == false){ alert("Save your document first before executing export to pdf. Script will be aborted."); exit(); }; //---------------------------------------------- var dupPreset = app.pdfExportPresets.item('[Smallest File Size]').properties; dupPreset.exportReaderSpreads = true; app.pdfExportPreferences.properties = dupPreset; var currPrefs = app.pdfExportPreferences; with (currPrefs) { useSecurity = true; changeSecurityPassword = "Password"; acrobatCompatibility = AcrobatCompatibility.ACROBAT_7; viewPDF = true; pageRange = PageRange.ALL_PAGES; disallowPrinting = false; disallowCopying = true; disallowChanging = true; } // Here one have to set the PDF Export Preset name: var pdfExportPresetName = '[Smallest File Size]'; // Check, if the preset is available: var pdfExportPreset = app.pdfExportPresets.itemByName('[Smallest File Size]'); // Preset is not available, do nothing: if( !pdfExportPreset.isValid ){ alert( "ERROR: No pdfExportPreset found. | SCRIPT")}; var pdfPath = Folder.selectDialog("Folder to save the LOW res pdf:"); var pdfName = d.name.substring(0, d.name.indexOf("."))+"_lr.pdf"; var userDefFileName = prompt("File name:",pdfName,undefined); if(userDefFileName == null){ exit(); }; var pdfFullName = pdfPath+"/"+userDefFileName; if(File(pdfFullName).exists){ c=confirm("The PDF-file \""+userDefFileName+"\" is already existing. Do you want to overwrite it?",true,undefined); if (c==0){exit()}; }; var doc = app.activeDocument; doc.exportFile(ExportFormat.PDF_TYPE,File(pdfFullName),false,pdfExportPresetName); currPrefs.useSecurity = false;
... View more
Jan 21, 2020
01:02 PM
for the preset "Smallest file size_spreads" the only change to the adobe supplied [smallest File Size] preset i made is to create the PDF as spreads because "exportReaderSpreads"is a property for object PDFExportPreset i cannot add exportReaderSpreads=true; up in my list of preferences because it will be overridden by the info in [Smallest File Size] is this correct? i would like to write this using the factory supplied [Smallest File Size] if possible to avoid having all my designers install or create a PDF preset in addition to the script scott
... View more
Jan 21, 2020
12:17 PM
thank you for helping me out with this project....you make me look like a rockstar!!!!! scott
... View more