Show Text Thread in all opened Document
I want to show text thread in all opended Documents, here is my script, but have error, anyone can fix?
var myEnableTextThreads = app.menuActions.itemByID(24332);
var myEnableTextThreads1 = app.menuActions.item("Hide Text Threads");
var myEnableTextThreads2 = app.menuActions.item("Show Text Threads");
ShowThreads();
function ShowThreads(){
var myDoc = app.documents;
for (var i=0; i<myDoc.length; i++) {
if (myDoc[i].menuActions.item("Show Text Threads") == true){
myEnableTextThreads.invoke();
alert("Text Threads Shown");
Hi,
No such property is exposed for scripting, unfortunately.
The one to observe is a menuAction.name ==> but this is only an effect of some procedure involved by menuAction. Even worse ==> script will show you the last menuAction status - not the one is currently applied to activeDocument. It will update after menu activation in UI, not earlier.
So you can only toggle between both of them regardless on its current state, using app.menuActions.itemByID(24332).
If you will try to check (by script) its current menuAction.name ==> sometimes is true, sometimes is false.
If you will check it manually ==. is true cause is updated already.
Jarek
Similar Messages
-
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 ! -
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. -
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 -
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 -
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 -
[JS CS3] Show Text Threads
Does anyone know the syntax to script the View > Show Text Threads command in CS3? It seems that it should be something like:
app.activeDocument.viewPreferences.showTextThreads
...but that isn't in the DOM. I can't seem to locate it. Can this be done?Hi Fred,<br /><br />Here's a little function which will retrieve any menu action based on it <br />name (which appears in the UI). It's much quicker to access menus <br />directly (rather than loop), but this is an easy way to find them.<br /><br />function GetMenuAction(name){<br /> var menus = app.menuActions;<br /> for(var i=0;i<menus.length;i++){<br /> var menu = menus[i];<br /> if(menu.name == name){return menu}<br /> }<br /> return null;<br /> }<br /><br />Actually, this works too:<br /><br />menu = app.menuActions.item("Show Text Threads"<br /><br />Harbs
-
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
>
> -
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?"); -
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 -
I recently updated iTunes and had several crashes on the next sync with my ipad2. Now when I open the Pages App, all my documents are shown with a black and white Pages icon, the title and date created is there but I cannot open any of the documents I created with this app, I have about 2 months of work I need to be able to open!
It sounds like you are seeing what you should see when you are in the thumbnail view of all of the documents. If none of the files will open when you tap on them, try quitting Pages completely and then restart the iPad and try again.
Go to the home screen first by tapping the home button. Quit/close open apps by double tapping the home button and the task bar will appear with all of you recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner to close the apps. Restart the iPad. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button -
How do i tab through all open documents
Alt + Tab on a windows machine will tab through all open windows and documents. Command + Tab on my IMAC will only tab through the open applications. Is there a way I can set up the IMAC to work like to windows machine in this case?
four finger swipe upwards will show you everything thats open. its not the same as on a pc where it shows each program in a rotating type of display... but it does show each program and the windows within that program that are open.
-
How to access all open documents' ReadImageDocumentDesc?
Hi everyone,
I want to get access to the ReadImageDocumentDesc for all currently opened documents from an Export plugin, so I can give users the choice which of the documents to export. Is this possible?
I expected to have access to all documents via the "next" field of "ReadImageDocumentDesc *documentInfo" in form of a linked list, but that field appears ti be always NULL. Or isn't it for certain types of plugins?
If it isn't possible, are there other tricks I could use to accomplish my goal? Is a stack renderer plugin an option perhaps?
Any kind of help is highly appreciated.
BerndI have the same question. When I write a filter plugin in, I try to access two open pictures to deal with both of them. But I can't find how to utilize the ReadImageDocumentDesc * next to finish it. Is it possible?
-
Making "Properties bar" active in all opened documents OR opening multiple documents in the same win
Adobe Acrobat Pro. / Extended version 9
OS: Windows XP SP3
Hi & thanks for your services.
In acrobat 8 we could open >1 pdf in the same window; this is not available for V.9 & the problem is that full editing is possible ONLY in the window opened last because "properties bar" is not active in other windows but the last one.
So please let us open more than one pdf in the same window for acrobat 9, or make full editing (active "properties bar") available in all opened windows.
I shall also say that generally V.9 is better & more stable than V.8.
With great appreciations.
[email protected]This is the worst thing to happen to acrobat, in my opinion.
The clutter that it creates on my computer and the fact that i cant even see the document title when I have a bunch of them open (because the task bar is too full) is unacceptable.
I never would have changed from Acrobat 8 if I had known, and now I cant switch back (company license).
The latest thing i can find about addressing it is here:
http://kb.adobe.com/selfservice/viewContent.do?externalId=kb405108&sliceId=1
which was in november 2008....
why hasnt any thing else been done about it? I just spent 45 minutes being sent to different departments over the phone, only to be told to submit a feature request.
Please do this if you havent already:
http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
Maybe you are looking for
-
HT1386 my itunes wont sync all of my songs and i dont know why.
This problem never used to be there for me but now it is it has nothing to do wiothe space left because i have enough left i have tried looking at other answers but they havent really helped please help quickly
-
Does Oracle have plans to release the 9i database on Solaris 9 (Intel)? Thanks, --Brandon
-
Maintain condition record on the basis of Forwarding agent
Hi, How to maintain condition record on the basis of Forwarding agent? ie. Forwarding agent is not there in field catalogue in condition table.what to add and how to maintain condition record for same? Reg, Antaa21
-
6 Long Beeps when installing a graphics card
Hi i have a HP Pavilion P7-1262 and i bought a GeForce GTX 750ti to install onto it. But when I plag it in to my motherboard and power up my computer it just beeps at me 6 times. And before you link me to the other post with a similar title, I've bee
-
Hi, I would like to know whether Oracle VM Server for SPARC version 2.0 support NUMA or not? We're having some problem with JAVA garbage collection (+XX:UseNUMA is enabled) on LDOM running on Sparc T3. Restarting the LDOM can help resolve the problem