AppleScript to run on ALL opened Pages document instead of Active one.

Hello,
I have many AppleScript i'm running on the active Pages document... but If I would like to run the Script on ALL opened Pages document?
What would be the line to add/modified at the top?
Thanks in advance...
Example of a script running on the active Pages document.
set theTargetWords to {"www.network"}
tell application "Pages" to activate
tell application "System Events" to tell process "Pages"
  -- Open the "Find & Replace" window:
  keystroke "f" using command down
     repeat until exists window "Find & Replace"
     end repeat
     tell tab group 1 of window "Find & Replace"
  -- Adjust the settings:
  click radio button 2 -- Advanced
          if value of checkbox 2 is 1 then click checkbox 2 -- Don't match case
          if value of checkbox 3 is 1 then click checkbox 3 -- Whole words
          if value of checkbox 1 is 0 then click checkbox 1 -- Search previous text (loop)
  click pop up button 1 -- find in
  click menu item 1 of menu 1 of pop up button 1 -- Entire document
  click pop up button 2 -- replace style
  click menu item 1 of menu 1 of pop up button 2 -- Any
  -- Delete every target word:
          set value of text area 1 of scroll area 2 to ""
          repeat with thisWord in theTargetWords
               set value of text area 1 of scroll area 1 to thisWord -- the target word
               click button "Replace All"
          end repeat
     end tell
end tell

I have many AppleScript i'm running on the active Pages document... but If I would like to run the Script on ALL opened Pages document?
What would be the line to add/modified at the top?
Try this:
tell application "Pages"
    activate
    tell application "System Events" to set theOpenWindows to windows of process "Pages" whose subrole is "AXStandardWindow"
    repeat with thisWindow in theOpenWindows
        tell application "System Events" to tell thisWindow to perform action "AXRaise"
        tell front document
            -- ENTER YOUR CODE HERE
        end tell
    end repeat
end tell

Similar Messages

  • Emailing an opened pages document instead of an attachment

    Having trouble sending an opened Pages document on my custom letterhead as anything but a PDF (which compromises the logo graphics) or an attachment. Can an opened Pages document (have to convert to Word for my recipients) be sent by email without cutting and pasting?

    No, you have to use attachment of a pdf or word file or do the copy and paste.

  • Is there a way to save all open pages documents simultaneously?

    Is there?

    Under 10.6.8, as fruhulda wrote, this feature is unavailable.
    Under 10.7.x, every document which was saved at least once is closed/saved automatically when we quit the application.
    Yvan KOENIG (VALLAURIS, France) lundi 26 décembre 2011 11:00:09
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • All old pages documents are blank

    Did the update to Pages 4.0.3. iWork '09. Running 10.5.8. MDD Dual 1.44
    Now all old Pages documents are blank.
    Suggestions?
    Thanks,
    Rich

    Kensey,
    Have you recently begun using Lion? Has it been more than 2 weeks since you last opened those documents?
    Did you notice a button marked "Unlock" in that dialog that informed you that the document was locked?
    Jerry

  • Open Pages documents from an older version

    I need to open Pages documents from an older version of Pages that I saved to an external drive from a computer that I no longer have access to.  My current operating system is 10.7.5 and I can't upgrade it right now.  I see that Pages 5.0 requires 10.10 or higher and I can't find older versions to download and from what I've read, it doesn't sound like I'd be able to open the old documents with the new version anyway.  I really need these documents. What can I do?

    I found it helpful to convert all my old Pages '08 files to .doc files.  They can be opened by the new version of Pages.
    Since the new version of Pages is no longer back compatible, and so not good for anything you want to keep for a long time, you might consider using an open source word processing application like Libra Office.  That's what I had to do.  After seven years of being a happy Pages user - archiving thousands of files in Pages -Apple has abandoned us.  I no longer think it is wise to use the new Pages and then five years down the road (or sooner) not to be able to open them in a newer version.
    If you would like a quick way to convert your Pages '08 files to .doc, let me know.

  • I created a newsletter using pages on my IPAD3.  I can see see it...the icon is till there but when I tap it to open it, I get kicked out of pages.   Tried rebooting  and I can open other documents, but not this one.  Any ideas?

    I created a newsletter using pages on my IPAD 3.  All of a sudden I can no longer open that document.   When I click on it, it throws me out of pages all together.  I can open other pages documents, but not that one.  It is very frustrating to be able to SEE the file, but not open it.
    I rebooted and I do have icloud back-up on but am not sure how to restore an older version.  I also made sure there are no updates for pages.   Until the IPAD I used a home PC which I still have but am trying to wean myself off of.  I wish now I had used MS Publisher on my PC for the newsletter even though I hate it.   
    Please don't tell me I have lost my Newsletter and 20 hours worth of work.  

    Try resetting your iPad.  Hold the on/off and home buttons together for 7 or 8 seconds till the Apple logo appears.
    I'm assuming your default is to save Pages documents to iCloud, and that you had a good WiFi connection when you closed Pages the last time you tried to save the document.

  • Cannot open Pages documents that I've worked on.  I open a new document, work on it, then save and close it.  When I try to open the document again, I get the following message: The document "[name]" could not be opened. The file isn't in the correct form

    I cannot open Pages documents that I have worked on and saved.  When I try to reopen Pages documents that I've saved, I get the following
    message:
    "The document “[name of document]” could not be opened. The file isn’t in the correct format.
    The file might be corrupted, truncated, or in an unexpected format."
    I have downloaded the latest update to iWork, but that doesn't help.
    I use Mac OSX 10.6.7
    I am using Pages '09 version 4.0.5 (852)
    If anyone can help, I would greatly appreciate it.
    Best regards,
    New York Mac User

    A few general trouble shooting tips that may apply here:
    1. If you used Software Update to do the OS update(s) to reach 10.6.7, go to http://support.apple.com/downloads/ and download and apply the Mac OS v10.6.7 Combo Updater. The Combo Updater contains some fixes that were not included in the incremental updaters used by Software Update.
    1a. Check that you have the current version of Pages (and of the other iWork applications) installed. All three applications' current version numbers end in .0.5
    2. A common cause of malfunctioning applications is a corrupted preferences file (.plist file). Your Pages '09's plist is at yourname > Library > Preferences > com.apple.iWork.pages.plist
    Quit Pages, locate the file and Drag it to the Desktop (or to the Trash).
    Restart Pages and attempt to open one of the files.
    If all is well, Trash the plist file and empty the Trash.
    If there's no change, AND you've made changes to the Preferences that you wish to keep, drag the file back to its previous location, replacing any new one that has been created.
    Regards,
    Barry

  • How to open pages documents with windows vista

    Does anyone know how to open pages document with windows vista? i saved it onto a usb stick but when i tried to open it on the computers in my university which support windows vista, it didnt reconise the file and opened with a page of question marks!!!! Im panicking now!!!!!
    Id appreciate any help!!! thanks!!!!!

    beckstarr wrote:
    Does anyone know how to open pages document with windows vista? i saved it onto a usb stick but when i tried to open it on the computers in my university which support windows vista, it didnt reconise the file and opened with a page of question marks!!!! Im panicking now!!!!!
    You cannot open it on Windows Vista. The only application in the world that opens a Pages document is Pages, and it is Mac OS X only.
    Your options:
    1. Find a Mac with Pages installed, and save the document as doc or pdf, which you can open on Vista.
    or, if that is impossible,
    2. Open the files in a texteditor like Notepad.exe on Windows and try to piece text fragments together to get at least part of your original text back. The images should also be available somewhere, even though all formatting is gone.

  • HT4088 how do I transfer all 312 pages documents that I have on my iPad to my computer?

    how do I transfer all 312 pages documents that I have on my iPad to my computer?

    What kind of computer do you have?  If you have a Mac, is it running OS X 10.8?

  • Pages 2.0.2 doesn't open Pages documents from ipad

    Pages 2.0.2 doesn't open Pages documents from ipad 2. Document succesfully transferred as Pages document to computer, but Pages 2.0,2 wouldn;t open it. Version too old?

    Pages 2 is iWork '06, two versions behind what the iOS Pages creates. You need to use Pages '09 which you can purchase from the Mac App Store as a stand-alone application or a retail box of the iWork '09 suite.

  • Pages will no longer let me open files that I have previously downloaded, worked on and then saved on my mac. However it will let me open pages documents that I have started from new. I need the other documents to open and can't figure it out. PLEASE

    Pages will no longer let me open files that I have previously downloaded, worked on and then saved on my mac. However it will let me open pages documents that I have started from new. I need the other documents to open and can't figure it out. PLEASE

    I just got my mac a month ago so go easy on me but I was just working with the pages that was already on it, and then today I know it updated, and now I am unable to open a lot of my documents!:(  Idk what you mean by the icloud version lol sorry! As for the version, when I open pages from my apps and click 'about' it says version 5.1? And when I open the document it just goes grey and kind of blinks and doesnt open? No error message or any indication of why it will not open now when I for sure have opened it in the past! Andddd for the OS X I think it is 10.9.1 ??

  • If i uninstall pages, will i lose all my pages documents?

    Im having a problem with my pages application. So i want to uninstall it and reinstall it. If I do this, will I lose all my pages documents?

    As long as you have saved the documents somewhere sensible on your Hard Drive, like in Documents you will be fine.
    Back them up anyway to another location.
    Peter

  • Is there an issue opening Pages documents between iMac and iPad"

    got the most recent version of operating systems and pages on both iMac and iPad; thought I should be able to open Pages document on both computer and device.  am I wrong?

    Make sure you are trying to open these documents in Pages 5. If you're using a Dock icon you had before updating, be aware that the Dock icons are not updated & will continue to launch the previous version which is still in your Applications folder in a folder named iWork 09.

  • Does the magic mouse not have the feature of viewing all open pages on desktop like you do when you use the side buttons of the wired mouse?

    Does the magic mouse not have the feature of viewing all open pages on the desktop like you do when you use the side buttons of the wired mouse?

    No, you'll have to use Mission control for that.  It's either located on the dock, the F3 key on recent laptops on a swipe on the trackpad.
    Regards,
    Captfred

  • Why does closing all open windows (15) and leaving only one drop ram usage from 1.5 to 1.4Gb and not more.

    Why does closing all open windows (15) and leaving only one drop ram usage by only 100mb from 1.5 to 1.4Gb.
    What is in this 1.4 gb ?
    I don't care much about ram, It's just that cpu usage spike like crazy by the end.
    ''Edited to remove swearing - TonyE''

    Hi musicfan,<br />Sorry you are having problems with Firefox. Maybe you should have asked earlier and we could have fixed it.
    Reading your comments I do not see that rolling back to an insecure Firefox 22 will actually help you much. You are probably best using IE, unless you have also damaged that.
    *[[Export bookmarks to Internet Explorer]]
    You should not use old versions they are insecure. Security fixes are publicised and exploitable.
    * [[Install an older version of Firefox]]
    * https://www.mozilla.org/security/known-vulnerabilities/firefox.html
    Most others will not be having such problems. We are now able to say that with confidence because after developers missed a regression in Firefox 4 telemetry was introduced so that data was obtained. It may be an idea to turn on your telemetry, if you have not already done so, and decide to stick with Firefox.
    *[[Send performance data to Mozilla to help improve Firefox]]
    Trying safe mode takes seconds. Unfortunatly if you are not willing to do even rudimentary troubleshooting there is not anything we can do to help you.
    *[[Troubleshoot Firefox issues using Safe Mode]]

Maybe you are looking for

  • Mac can't find my partitioned external HDD

    My previous setup was: 1 WD 2TB external HDD with own power supply, formatted as MacOS Extended (Journaled). But I wanted to split this HDD up into two partitions, Archive and Library. I also wanted to have a Time Machine backup of this disk. So I bo

  • Why does text not format correctly when pasting into outlook?

    I am attaching a Screenshot of an email to better help you understand. Basically, I receive an email from customer.  I draft an email to respond and send to my boss to get approval.  Once my boss approves, I go back to my original sent email and copy

  • Need help playing videos in iPhoto!

    I got my iMac two weeks ago after switching from a 2004 80GB Dell Dimension (Windows XP Service Pack 3)  I successfully imported my parents' photos and videos, our iTunes library, and all my photos. For some reason however, my videos won't play. It s

  • What's the usual going price to repair a cracked display screen on an iPod touch?

    The display screen is severly cracked, and I want to take it to get it repaired. The problem is that at the moment I don't have a job, so I don't have much money, and I was wondering if anyone could tell me what the usual price for this repair costs.

  • 11g to 10g Dataguard

    Dear Friend, We have set up for Physical stand by between two 10g instances. Now its required to upgrade oracle version , but 1st we want to upgrade Primary DB version to 11g then later on stand by. So is 11g to 10g DG is possible?, does logical stan