1 2 3 4 Previous Next 45 Replies Latest reply: May 6, 2014 8:54 AM by alcanito Go to original post
  • 15. Re: how do I do a "save as" on Pages?
    Level 8 Level 8 (41,760 points)

    Hello Peter

     

    Here is a slightly enhanced version of a script already posted months ago.

    I azdded support of the iBooks Author files.

     

    --{code}

    --[SCRIPT set_stationery]

    (*

    Enregistrer le script en tant que Script : set_stationery.scpt

    déplacer le fichier ainsi créé dans le dossier

    <VolumeDeDémarrage>:Utilisateurs:<votreCompte>:Bibliothèque:Scripts:

    Aller au menu Scripts , choisir “set_stationery”

    Naviguer pour sélectionner le document à convertir en modèle.

     

     

    On peut également enregistrer en tant qu’application.

    Dans ce cas,

    double cliquer puis naviguer pour sélectionner le document à convertir en modèle.

    ou

    glisser déposer l’icône du document à convertir sur celle de l'application

     

     

    Si vous définissez la property add_TM comme true, le caractère ™ sera inséré à la fin du nom du document converti pour faciliter son repérage.

     

     

    --=====

     

     

    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: set_stationery.scpt

    Move the newly created file into the folder:

    <startup Volume>:Users:<yourAccount>:Library:Scripts:

    Go to the Scripts Menu,  choose “set_stationery”

    Navigate then select the document to convert.

     

     

    You may also save as an application.

    In this case :

    double clic the app’s icon to navigate then select the document to convert.

    or

    drag and drop the icon of the document to convert upon the app’s icon

     

     

    If you set the property add_TM to true, the character ™ will be inserted at the end of the filename allowing you to quickly identify stationeries.

     

     

    --=====

     

     

    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.

     

     

    --=====

     

     

    Yvan KOENIG (VALLAURIS, France)

    2011/09/08

    2012/01/01 added support of the alternate iWork's typeIDs

    2012/04/18 added support of iBooks Author documents

    *)

    --=====

     

     

    property add_TM : true

    (*

    true = insert the character ™ at the end of the filename

    false = leave the name untouched

    *)

    property un_document : ""

     

     

    --=====

     

     

    script main

              (*

    Use the property un_document *)

              local type_ID

              tell application "System Events" to set type_ID to type identifier of disk item (my un_document)

     

              if type_ID is in {"com.apple.iwork.keynote.key", "com.apple.iwork.keynote.sffkey"} then

                        (*

    Convert a Keynote document *)

                        tell application "System Events" to tell disk item (my un_document) to set name to (text 1 thru -4 of (get name) & "kth")

              else if type_ID is in {"com.apple.iwork.numbers.numbers", "com.apple.iwork.numbers.sffnumbers"} then

                        (*

    Convert a Numbers document *)

                        tell application "System Events" to tell disk item (my un_document) to set name to (text 1 thru -8 of (get name) & "nmbtemplate")

              else if type_ID is in {"com.apple.iwork.pages.pages", "com.apple.iwork.pages.sffpages"} then

                        (*

    Convert a Pages document *)

                        tell application "System Events" to tell disk item (my un_document) to set name to (text 1 thru -6 of (get name) & "template")

              else if type_ID is in {"com.apple.ibooksauthor.book", "com.apple.ibooksauthor.pkgbook"} then

                        (*

    Convert an iBooks Author document *)

                        tell application "System Events" to tell disk item (my un_document) to set name to (text 1 thru -5 of (get name) & "template")

     

              else if type_ID is in {"com.apple.iwork.keynote.kth", "com.apple.iwork.keynote.sffkth", "com.apple.iwork.numbers.template", "com.apple.iwork.numbers.sfftemplate", "com.apple.iwork.pages.template", "com.apple.iwork.pages.sfftemplate", "com.apple.ibooksauthor.template", "com.apple.ibooksauthor.pkgtemplate"} then

                        (*

    Skip iBooks Author, Keynote, Numbers, Pages templates *)

                        set my un_document to ""

                        error number -128

              else

                        tell application "System Events"

                                  try

                                            tell disk item (my un_document)

                                                      if not stationery then

                                                                set stationery to true

                                                                if add_TM then

                                                                          (*

    Optionally insert ™ at the end of the filename to easily recognize templates *)

                                                                          set name_extension to name extension

                                                                          if name_extension is "" then

                                                                                    set name to name & " ™"

                                                                          else

                                                                                    set name to (text 1 thru -(2 + (count of name_extension)) of (get name) & " ™." & name_extension)

                                                                          end if -- name_extension

                                                                end if -- add_TM

                                                      end if -- not stationery

                                            end tell -- disk item…

                                  end try

                        end tell -- System Events

              end if -- type_id

              (*

    Clean the stored property *)

              set my un_document to ""

    end script

     

     

    --=====

     

     

    on run

              set my un_document to ((choose file without invisible) as text)

              run script main

    end run

     

     

    --=====

     

     

    on open sel

              set my un_document to (first item of sel) as text

              run script main

    end open

     

     

    --=====

    --[/SCRIPT]

    --{code}

     

    Yvan KOENIG (VALLAURIS, France) mercredi 18 avril 2012

    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.3

    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

  • 16. Re: how do I do a "save as" on Pages?
    Level 8 Level 8 (41,760 points)

    PeterBreis0807 wrote:

     

    Here Yvan try and follow this:

     

    1. I receive a file open and duplicate it, hopefully I have beaten any attempt by Lion to save changes to the original which is a named file and subject to auto save.

     

    2. I then work on the duplicate, trying a lot of alternatives which are getting saved as I work so that the file is no longer original. To get back to the original state I have to start all over again or jump through complicated hoops to find a version that may or may not be the original file as I opened it.

     

    3. As this is happening behind my back, I would need to hunt out the saved versions and compare them to an opened "original" version to find out what has changed, only the "original" version would also be being changed whilst I am checking it for changes!

     

    4. As the versioning is stored on your current system's hard drive, what happens when the file is on another hard drive or volume? What happens when you switch systems/users to work on the same file? What happens across servers?

     

    It is like herding cats.

     

    Whatever Apple chooses to do in a hidden folder is hardly illuminating or helpful to the user who isn't watching what is going on, nor even able to easily check what is going on if they have to.

     

    To make this "easier" the user needs to understand what Apple hasn't bothered to explain and isn't readily apparent. Frankly my brain is not "the size of the universe" and is unlikely to become so just by Apple assuming I fall into 2 categories:

     

    Too stupid to know

     

    or

     

    So clever, I don't need to be told!

     

    Peter

     

    One more time, you didn't read carefully.

     

    A document file contains a single state of the work in progress : the late one.

    If you didn't explicitely as the app to do, it store versions datas once an hour.

    So, you are exactly in the same old situation.

     

    Without Autosave, to revert to an old state of the file, you had to close the modified document and restart from it's original state.

    Now, you close the modified doc and create a new duplicate.

    In both cases, you are free to apply undo if you want to remove some changes.

     

    The versions aren't stored on the startup HD, they are stored at the very first level on the HD where the file is saved.

    If you switch the user account or if you restart from an other HD, no problem. It the file is on a mounted HD, related versions are mounted too.

     

    It's really boring to see that you and others are criticing a feature which you didn't tried to study a bit.

     

    About half what is done by the operating system is stored in hidden files since the delivery of OS X.

    Older systems used also hidden files but with a smaller extent.

     

    What is delivered by Apple is perfect as long as :

    (1) we don't delete a file by error

    (2) a file is not corrupted for some reason.

     

    As a long time user, you know that these cases aren't specific to Lion.

    I receive several corrupted files each week and I don't count the number of users loosing their datas for some reason (often because they played with matches).

     

    In case of crash, what is delivered in-the-box brings the files to surface.

     

    Apple just forgot the two cases described above.

    The way Versions is designed, we aren't supposed to enter the hidden folder but I just decided to give us the ability to give more power to the delivered tool.

    It's not the first time which I give tools filling gaps.

    Without AutoSave and Versions, what I offered  can't be done.

     

    Versions doesn't apply to networks. If my memory is right, it's because it is dedicated to HFS+ devices.

     

    Oops, I was forgotting something.

    The preference allowing iWork applications to keep a backup of the original document when we save it is always available under Lion. As I don't use it I don't know if it apply each time the app autosave.

     

    Yvan KOENIG (VALLAURIS, France) mercredi 18 avril 2012

    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.3

    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

  • 17. Re: how do I do a "save as" on Pages?
    PeterBreis0807 Level 7 Level 7 (29,630 points)

    I just thought of another fun instance:

     

    2 people access the same file and edit it at different times. Now they have two sets of versions on two different computers with theoretically the same file.

     

    Peter

  • 18. Re: how do I do a "save as" on Pages?
    Level 8 Level 8 (41,760 points)

    Really boring to see that you can't read carefully.

    I carefully wrote that Versions doesn't apply on files saved on a network.

    If user1 open a file on the network and edit it, only the file stored on the network will exist.

    No versions datas are stored.

    If the same user decide to download the document, open the local copy, edit it then move the edited version to the network, he will have versions-datas as long as he keep the local document which would be ridiculous because he is supposed to know that the document available on the network may be edited by an other user.

    If user2 open the edited file and work on it his changes will be stored on the network.

    They remain with a single copy.

    Nothing changed if we compare to the old scheme.

     

    I wish to add that iWork was never described as a tool designed for collaborative work.

    Trying to use it this way is playing with matches.

    There is no provision to treat the case of two users trying to work on a file simultaneously.

     

    I was asked several times to build scripts allowing to treat this problem but it seems that none of my attempts were fully satisfactory.

     

    Yvan KOENIG (VALLAURIS, France) mercredi 18 avril 2012

    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.3

    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

  • 19. Re: how do I do a "save as" on Pages?
    PeterBreis0807 Level 7 Level 7 (29,630 points)

    KOENIG Yvan wrote:

     

    Without Autosave, to revert to an old state of the file, you had to close the modified document and restart from it's original state.

    Now, you close the modified doc and create a new duplicate.

    In both cases, you are free to apply undo if you want to remove some changes.

     

    In Snow Leopard it is a simple Revert to Saved… and you know it is the original.


    Undo is eratic in what it does or doesn't undo. I don't rely on it. You are afool if you think it is accurate.

     

    The versions aren't stored on the startup HD, they are stored at the very first level on the HD where the file is saved.

    If you switch the user account or if you restart from an other HD, no problem. It the file is on a mounted HD, related versions are mounted too.

     

    Not at all complicated and Apple really details all this somewhere. Now let's see where that somewhere is. No… not anywhere I can find.


    What about when one of those hard drives or systems is running an older sytem than Lion?

     

    It's really boring to see that you and others are criticing a feature which you didn't tried to study a bit.

     

    I've worked with a stack of files now in Lion and it is mind blowingly difficult to follow. You simply don't know the state of play at any one time.


    Again, like most, I am behind on my doctorate on "What Apple has lately changed in Mac OSX - Secrets from the Deep". My spies within the Hidden City of One Infinity Loop are getting on with their lives, as I should be.

     

    About half what is done by the operating system is stored in hidden files since the delivery of OS X.

    Older systems used also hidden files but with a smaller extent.

     

    Hidden is good right? So how many hidden things are hidden? The answer is hidden!


    Let's just not muck around with all this pretense of "Just works" and "Intuitive". Let's go right back to DOS where what to do and what was happening was virtually always hidden.

     

    What is delivered by Apple is perfect as long as :

    (1) we don't delete a file by error

    (2) a file is not corrupted for some reason.

     

    Talk about blind faith. Nothing is perfect, definitely not what Apple is cooking up lately. What is worse is you saying, and Apple assuming, that it is perfect. Shades of the anniversary of the sinking of the Titanic. Hubris revisited.


    Apple has been sitting on the vunerabilities in OSX for months. The only reason we know about them is the spate of Trojan outbreaks let the cat out of the bag.


    Apple is documenting less and less of a User Interface that is increasingly hidden. That is a combination for User mayhem.

  • 20. Re: how do I do a "save as" on Pages?
    PeterBreis0807 Level 7 Level 7 (29,630 points)

    That this has caused so much confusion and angst in these forums alone speaks for itself.

     

    This schema is neither obvious, nor fool proof.

     

    Your "explanations" reveal just how complicated Apple's "solution" to a simple auto save has become.

     

    They are your explanations. Apple has provided none, definitely none that the regular user can consult.

     

    Steve Jobs said about PIMs and Smart Phones, if there is a stylus they got it wrong.

     

    If a simple matter of opening and saving files needs this much convoluted explanation without even a hint of resolution, then someone seriously got it wrong.

     

    To compound it, Apple is treating the Mac OSX and iOS as if they are synonymous when often they are not even alike and definitely the iOS system and iOS versions of iWork are totally undocumented.

     

    Peter

     

    ps I am trying unsuccessfully to find the Monty Python sketch of the English private school teacher's instructions to his students on how to hang their coats and hats before class. It is a brilliant parody of how to make the simple ludicrously complicated, then berate the victims for spotting the obvious flaws and contradictions.

  • 21. Re: how do I do a "save as" on Pages?
    Jerrold Green1 Level 7 Level 7 (28,995 points)

    PeterBreis0807 wrote:

     

    Because Jerrold we do want to save it in a particular state.

     

    Rubbery is for schmucks.

     

    Which is why banks and similar institutions love having their conditions on the web and your signature on their paper documents. Usually in triplicate.

     

    Peter

    So, Bank Rubbery is a crime if you do it to them, but not if they do it to you.

     

    J.

  • 22. Re: how do I do a "save as" on Pages?
    PeterBreis0807 Level 7 Level 7 (29,630 points)

    Well I did suggest to my local branch that they should adopt balaclavas as part of their uniform.

     

    Peter

  • 23. Re: how do I do a "save as" on Pages?
    Woffman Level 1 Level 1 (0 points)

    Jerry, There are times when an applicaiton or OS does more than you want it to (think Microsoft).  In many instances you simply do not have to use those features.  In some cases you can turn off features in preferences that do not serve your purpose.  The autosave/versions scheme can not be ignored or turned off.  I want to control what is saved, when it is saved and where it is saved.  I understand the risk of perhaps losing a doc to a software shutdown on occassion.  However, my macs have been so reliable (to date) that it really has never been an issue.  So, I understand why some want and like the new scheme.  I simply do not need it or desire it, but it has been imposed on me.  In previous versions of OS X there are features that I never used (spaces, widgets, time machine) and Lion has added features that I like (additional trackpad gestures, animations, et. al.).  At present, however, I must revert to earlier versions of iWork to avoid autosave (which kills my workflow in keynote) and to retain the simple save/save as scheme that serves my purposes.  Generally, I am wary of the fusion of iOS with OS X (especially with regard to file saving),  I don't mind the way iOS handles files since I use it to connect me with my work on the Mac.  I just don't want that kind of file management system on my Mac.  Again, the OS is doing more than I want it to.  So, no, I don't want to adjust my workflow to the new OS.  It is my understanding that Mountain Lion will modify their scheme a bit and I am looking forward to the new version of iWork just to see what new features it will include. 

  • 24. Re: how do I do a "save as" on Pages?
    Jerrold Green1 Level 7 Level 7 (28,995 points)

    I don't expect Apple to retreat.  My plan is to try to adapt.

     

    Jerry

  • 25. Re: how do I do a "save as" on Pages?
    Woffman Level 1 Level 1 (0 points)

    Nor do I, but us old hippies have to rail against the establishment, even one as hip and cool as Apple, Inc.

  • 26. Re: how do I do a "save as" on Pages?
    Level 8 Level 8 (41,760 points)

    Folder icons are hidden.

    Datas describing the layout of icons in a folder are hidden.

    Datas stored by Spotlight are hidden

    Trashes are hidden

    A lot of executable Unix command files are hidden because they are not designed to be triggered thru the GUI interface.

    They are hundreds of files hidden for this reason.

    As far as I know, most of us never saw gears in their motorcar gearbox and they never saw what is in the motor itself. Most of human beings are ignoring what or where is this or that organ of their body.

    When everything is transparent, it's no longer democracy, it's fascism.

     

    I repeat that you are boring.

     

    AutoSave is a feature, Versions is an other one. It's really pitiful that beings supposed to be intelligent like you and some others in these discussions forums prove to be unable to understand what was explained here more than 20 times.

     

    So, I repeat.

     

    Autosave is supposed to apply automatically when we change something in a document.

    Versions apply :

    (1) just before or just after (I don't know this detail) when we save a document for the 1st time.

    It's needed to build the structure in which versions related datas wil be stored when required.

    (2) when we trigger a deeply hidden menu item named « Save A Version ».

    I'm really puzzled by the numbers users perfectly ignorant which wrote that this item replace Save As.

    Being ignorant isn't a crime but writing this or that about what we ignore is near that.

    (3) after one hour elapsed since the last « store versions datas » action.

    As you see, I don't use the Apple wording to underline the fact that « Save a Document » and « Store a version » is not the same thing.

     

    When we apply the default iWork '09 format, a document is tha result of an elaborate compact task applied to a folder.

     

    The datas stored in versions are completely different.

    Say, I create a Pages document from the Blank template.

    I save it immediately because I'm aware of the bug striking in Lion.

    Doing that, the app create the well known document.

    Versions create it's own structure (a SQL database one):

    it store :

    the buildVersionHistory.plist file

    the index.xml file

    the Thumbnail.jpg file which is normally in QuickLook subfolder.

    I never checked but I assume that it stores also the PkgInfo file which is normally in Contents subfolder

     

    Now, I make some changes in the embedded text, paste a picture and decide to « Store A Version » (I repeat that I deliberately use my own wording).

    The changes which I made  introduced no modification in PkgInfo so this one is not stored an other time in the Versions datas.

    index.xml was changed, thumnail.jpg was changed because it reflects the document's first page. So these modified items are stored but the old ones aren't removed. I forgot to name buildVersionHistory.plist file which is modified so stored in versions.

    The picture file describing the pasted image is stored too.

     

    Back to the document, I decide to add some text, I replace the picture by an other one and one more time, I trigger « Store a Version ».

    the new index.xml, the new thumbnail.jpg, the new buildVersionHistory.plist file and the new picture file will be stored (I repeat that the old ones aren’t removed).

     

    When I open the buildVersionHistory.plist file with Property List Editor, I see a date but no time value.

    I guess that it's just a feature of the editor because the time info is available but maybe, it's just grabbed from the file's creation date.

     

    The process will continue during the document's life.

    Happily, not too dumb users will not trigger « Store A Version » so often.

    From my point of view, the one hour delay defined by Apple is too long so, I trigger it every 10 minutes but it's just my own advice.

    I guess that you are thinking : « what a mess, it use a lot of disk space ».

    You are quite right but:

    the system has its own workflow to rule the HD use. I will not detail this workflow because it wouuld be too long.

    Just say that from time to time, the system apply some cleaning. One more reason to use my scripts to keep a complete history of the documents.

     

    If I continue to work during 58 minutes on the doc without storing a version by hand then close it, only the document will be saved.

    If I continued to work 60 minutes in lieu of 58, Versions will apply automatically and store the document's components which were modified during the 60.

     

    I described what apply to iWork documents.

    As I already wrote elsewhere, iWork apps were not coded with brains but with feet.

    If they were coded by brains, they would not store the entire index.xml, they would store only the subset describing the changes made between the two « Store A Version » task. This intelligent behavior is also required for an efficient iCloud compatibility.

    I guess that revising the code is a huge task which explain why we don't see an updated set of apps.

    I must add that maybe, behaving this intelligent way require features which would be available only in Mountain Lion. This is why I would not be surprised if the next major upgrade appear only after 10.8 delivery (with applications requiring this operating system).

     

    I apologizes Peter but to learn all that, I used only the documents which everybody may reach. OK, it requires time but you aren't asked to do that by yourself, some fools like me did the job and shared their knowledge.

    Isn't it the way all of us behave for years ?

     

    When some one ask here where he may learn how to use Pages, I respond : in Pages User Guide but our dear Fruhulda respond that it would be fine to buy and study a book (I apologize Fruhulda but I forgot its title). This book was written like me which took time to study the app, the existing resources and tried to make his knowledge available in a book.

    They are a few books about iWork apps, more about iLife's ones and a huge number about the operating system itself.

    It's not Apple duty to deliver resources describing in detail what Unix do behind the curtain giving us a fine operating system.

     

    I'm accustomed to read Peter ranting when I use the word « perfect ». I know that « well done » would be better but as you know, I'm lazy.

    And now, I'm tired.

     

    Just one more thing

    I see no valid reason why the user's library folder is hidden in Lion.

    It's why I posted several time the huge script allowing us to unhide it.

    Here it is again :

     

    --{code}

    do shell script "chflags nohidden ~/Library"

    --{code}

     

    From time to time, I unhide other items but, when I do that, I know what I'm doing.

     

    Yvan KOENIG (VALLAURIS, France) mercredi 18 avril 2012

    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.3

    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

  • 27. Re: how do I do a "save as" on Pages?
    Level 8 Level 8 (41,760 points)

    Hello

     

    I would be grateful if somebody is fair enough to translate my long message in plain English

     

    Yvan KOENIG (VALLAURIS, France) mercredi 18 avril 2012

    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.3

    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

  • 28. Re: how do I do a "save as" on Pages?
    PeterBreis0807 Level 7 Level 7 (29,630 points)

    I'll do it for you Yvan.

     

    "It just is, because it just is."

     

    Peter

  • 29. Re: how do I do a "save as" on Pages?
    PeterBreis0807 Level 7 Level 7 (29,630 points)

    btw It appears that Apple may be reintroducing Save As… in Mountain Lion:

     

    http://www.macworld.com/article/1165460/mountain_lion_what_you_need_to_know.html

     

    …and judging by the comments under the article the growing disquiet about where Apple is headed is growing into a dull roar.

     

    Steve Jobs isn't at Apple anymore to bind the troops to his Reality Distortion Field.

     

    Peter