Command in Java for "all opened documents"
I have a script that needs modification. Thank you all in the forum for helping me design this script from start btw!
Anyway, this is the script.
var myDoc = app.activeDocument;
app.findGrepPreferences = app.changeGrepPreferences = null;
// Change "Condition 1" to name of your condition
myConditionList = app.activeDocument.conditions.everyItem().getElements();
for (i=myConditionList.length-1; i>=0; i--)
if (myConditionList[i].visible == false)
myConditionList[i].visible = true;
app.findGrepPreferences.appliedConditions = [myConditionList[i].name] ;
app.findGrepPreferences.findWhat = ".+";
myDoc.changeGrep();
app.activeDocument.conditions.item(myConditionList[i].name).remove();
I'm looking for a variable that can apply for "all" opened documents rather than the active one only. I'm having difficulty finding the right command.
BTW, the script removes all hidden text and objects.
Programming has never been my strong side. Never understood it properly and probably never will =(. But thank you solving it. The code "JUMO_OVER" wrote, worked like charm. No need to execute the script 10x for 10 documents.
Pardon me for giving you guys more out headaches, I have two additional scripts that needs revision for the same purpose as above, i.e. able to exceute the scrip for all opened docs, saved or unsaved. I would really appreciated if you guys could help me convert them. I tried it do it on my own own, but I can't get it working... =(
Delete Empty Frames in active doc
var myStories = app.activeDocument.stories.everyItem().getElements();
for (i = myStories.length - 1; i >= 0; i--)
var myTextFrames = myStories[i].textContainers;
for (j = myTextFrames.length - 1; j >= 0; j--)
if (myTextFrames[j].contents == "")
myTextFrames[j].remove();
Delete Empty Pages in active doc
app.doScript("main()", ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT,"Remove Blank Pages");
function main () {
if (app.documents.length === 0) {
alert ("Please open a document.");
return;
app.scriptPreferences.enableRedraw = false;
removeBlankPages (app.Documents);
app.scriptPreferences.enableRedraw = true;
function removeBlankPages (doc) {
var pages = doc.pages.everyItem().getElements().slice(0);
var i = pages.length;
while (i-- >1) { // a bit quicker here
!pages[i].allPageItems.length && pages[i].remove ();
!pages[i].allPageItems.length && pages[i] != doc.pages[-1] && pages[i].remove ()
BTW, I didn't write them. So they may look quirky in your eyes.
Similar Messages
-
Sales document report for all open documents
hi i need the code for sales document report for all open documents is sd
... can anyone help me out.
thanks in advanceTry transaction VA05. In that choose "Open Orders" along with other selection criteria.
If you want the Open sales order qty in output and its not displayed, do the following.
Sales -> System modification -> create new fields ( without condition technique) -> New fields for lists.
You can change V05TZZMO and structure VBMTVZ from there or use SE38 / SE11.
For both you'll need an object registration in OSS.
Hope this helps.
Thanks,
Balaji -
Fit artboard in window for all open documents
I did a quick search and didn't see an answer for this. I often have to open 10 or so images from a client and they all need to have me fit artboard to each one seperately. Can I run a script that would run that command on every open file?
Thanks
MarcusIf I've understood you correctly then this should be all you need to do?
#target illustrator
function fitArtboards() {
if (app.documents.length == 0) {
alert('Open a document before running this script');
return;
} else {
for (var i = 0; i < documents.length; i++ ) {
app.activeDocument = documents[i];
app.activeDocument.artboards[0].artboardRect = app.activeDocument.visibleBounds;
redraw();
fitArtboards(); -
Looking for PS Script to Save and Close All Open Documents
I used ACR and CS5 to process my Nikon D3 NEF files. I would like a script that would save all open documents (witin PS) with the highest possible quality (12). I've found several scripts that will close all open documents with save but cannot figure out how to implement a save script.
For example, I may have 20 converted .jpeg files open. I would like to run a script to save & close all open documents.
Is it possible? Can someone post an example working script?Take a look at the image processor, under the scripts menu.
MTSTUNER -
Adobe cant open the pdf it may be damaged or corrupted this happens for all pdf documents
Adobe cant open the pdf it may be damaged or corrupted this happens for all pdf documents
Steps to resolve
Uninstalled and restarted the server
Installed agan same error
Uninstalled and restarted the server
- Installed version 9.5
- Same errorIs this happening for brand new files downloaded from the internet?
Or only for existing folders of PDFs on the server?
Has the modification date changed on the PDFs? -
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
>
> -
How to get all open document?
I want to replace some elements through all open documents in
dreamweaver.
eg. replace <b> to <strong> and </b> to
</strong>
I know i can do this by using "replacing all", but i want to
replace a lot of things together. it's boring to replace them one
by one :P
Anyone know how to make it?
Thank you for your help! ^^"xsiren" <[email protected]> wrote in
message
news:f1v1o5$333$[email protected]..
> the "dreamweaver.getDocumentList()" is only for get all
the list of open
> documens, istn't it?
> i tried to alert the value of it, and it show something
like
> "file://D:\develop\1.html" "file://D:\develop\2.html"
And then you are supposed to get the DOM out of the url,
passing it as an
argument to dreamweaver.getDocumentDOM()
Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com -
Hi,
I'm making a batch processing action and I really need a script that iterates through all open documents, finds the one with the biggest image size and then iterates one more time to change the rest of the documents to the same image size dimensions. At the end all documents must share identical image size. I'll really appreciate if someone can put a quick script for doing this. Thank you !I think should do…
#target photoshop
if (documents.length > 1) {
var smallest = 1000000; // Set beyond any size you may be expecting this should do?
for (var a = 0; a < documents.length; a++) {
smallest = Math.min(smallest,documents[a].width.as('px'));
for (var b = 0; b < documents.length; b++) {
if (documents[b].width.as('px') != smallest) {
app.activeDocument = documents[b];
var newWidth = new UnitValue(smallest, 'px');
documents[b].resizeImage(newWidth,undefined,undefined,ResampleMethod.BICUBICSMOOTHER);
}else{
alert("NOT enough docs to resize?"); -
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 ! -
Excel 2010: I get the error message "This file can't be previewed because of an error in the Microsoft Excel previewer." even though Advanced Properties is set to Save Thumbnails for all Excel Documents and I've run Repair on Microsoft Office.
I don't know what else to try.
Any help would be appreciated. Thanks.A hotfix request has already been submitted for this issue and we have also documented it here
http://support.microsoft.com/kb/983097
Thanks.
Tony Chen
TechNet Community Support -
HOW TO MIGRATE DUNNING LEVEL & LAST DUNNED DATE FOR ALL OPEN LINE ITEMS
Hi,
We need to upload dunning level & last dunned date for all open items (to be done separately i.e. after all open items migrated) which is different for each and every line item so if we use mass upload (fbl5n) we have to do for each and every open line item which is not feasible as open line items in thousands..I tried LSMW also,problem is that for Batch input recording we need to run one complete cycle in sm30 but there is no maintenance dialog for BSEG & BSID table.. Please share your valuable Inputs how we can go ahead..
Thanks in advanceHi Mark,
Thanks for your reply.
It is complete a Zcopy of a standard one, but we are facing one or two records are not updating correctly out of hundreds of customers in the worklist. -
How do i print all open documents
is there any way to print all open documents?
Oh, and if you want to use one of your print presets, do it like this:
app.documents.everyItem().print(false,
app.printerPresets.itemByName("myFabPreset"));
Ariel -
Run applescript on all open documents
hi all,
I have an applescript that was created to run on the active document. I dont have any applescript abilites but would like to change it to run on all open documents. the script removes all unused master pages and i would like it to run on all opened docs. what do i need to change to make it work?
here is the script....
set moreMasters to {}
tell application "Adobe InDesign CS3"
tell document 1
set allMasters to every master spread
set theMasters to applied master of every page
repeat with x in theMasters
set end of moreMasters to applied master of x
end repeat
set theMasters to theMasters & moreMasters
repeat with x in allMasters
if x is not in theMasters then delete x
end repeat
end tell
end tell
thanks in advance
DanRather than using the numeric index, you can also leave that to AppleScript.
tell application "Adobe InDesign CS4"
repeat with doc in documents
tell doc
set theName to name -- of doc
display dialog theName
end tell
end repeat
end tell -
Common Features for all SAles Documents
Hi gurus,
I like to share a piece of information regarding the common features for all Sales Documents;
They are
!) The incompletion Log
2) Fast Change Option..
Any new views can be discussed for the above.
Regards,
SaroshHi refer the link it may help u out
http://72.14.235.104/search?q=cache:p6G8tXimQ2UJ:homepages.wmich.edu/~s4senapt/bus%2520project%25204.htmSAPSDcommonfeaturesforallSalesDocuments&hl=en&ct=clnk&cd=16
Message was edited by:
SHESAGIRI GEDILA -
Customer Tolerance for all open item selected in an incoming payment.
Hi Experts
I have set a tolerance of 5 $ in OBA3 to be written off to Bad Debts account. This settings are working fine when an incoming payment is entered in F-28.
My requirement is, in F-28 I enter the Document Date, Posting Date, Company Code, Currency, REF, Doc.Header Text in the document header & enter the Bank Account, Amount and Text, then instead of entering the customer account in open item selection, I selet the process open items and Select the Reference as the selection criteria and enter a list of references (for clearing a Batch of open items for different customers).
Standard tolerance functionality will check if the complete incoming document meets the specified tolerance limits set in OBA3. But I want the tolerance of 5 $ specified to be applied for all the open items selected to be cleared with the incoming payment.
I understand that tolerance will be applied when the amount entered and amount of the open items (total) is within the specified tolerance.
But is there any option which will check if each of the open item selected for processing short of 5 $ and then write off to the bad debt account specified in OBXL.
Do we have any user exit, or BADi or can we use any of the BTE functionality to achieve this.
Kindly give your valuable inputs..
Thanks in Advance.
KIM Khan.Kim,
Did you get answer to this question? If so can you please share with me?
Thanks
Maybe you are looking for
-
Problem with my Iphone5 speaker
Okay how do I start will anyways the other day I gave my son my Iphone to watch Youtube and for some reason I don't know what he did but my speaker is really LOW. My volume is at the MAX and I can't seem to find the problem!! The phone isn't wet or d
-
I have a 2011 MacBook Pro that has, over time, become slower and clunkier. I ran EtreCheck but need some help deciphering the results. I've pasted them below. Any suggestions are appreciated. EtreCheck version: 2.0.11 (98) Report generated November
-
Editing a scanned paper document
hi all, i scanned a document that has an image as a background. i just purchased acrobat becasue someone told me it could be done. it is working for the most part but when i perform the ocr some of the text i am able to change but about 3 words whi
-
Controlling loaded SWF inside a child
Hello to everyone, may this question be too obvious to everyone, but I've been googling for hours without any luck. Have seen examples but they are not exactly as my scenario... Please, I need some help. I have loaded a SWF and attached to a MovieCli
-
Implicit convertion to raw is adding a leading 0 (sometimes only)
I'm running the following sql but the results from the select has a leading zero ex. 0123456789. Has anyone come across this issue? update xx_test_ssn set ssn = utl_raw.cast_to_raw('123456789') WHERE xx_test_SSN_ID = 1; COMMIT; SELECT utl_raw.cast_to