Save application document as same name

I have 300 files that were created in Quark Xpress 15 that need to be opened in Quark XPress 16 and Saved As the same name. I am new to KM and can open the files but would like to open first file, save as and the same name and close the file before doing the same with the next file. I am open to any suggestions and would be grateful for some advice.

Quark open file - intending to save each document as its current name.kmmacros (2.7 KB)

Hi Peter,

the first part of your macro (For each Path…) seems fine to me.

What you have to do then depends on XPress’ AppleScript dictionary. Unfortunately I don’t have XPress installed, and on the website I didn’t find any information about that.

  • Case 1, XPress has an AppleScript dictionary (what can be expected from a mature layout program):
  1. Open the dictionary with Script Editor File > Open Dictionary… and look for the correct command to save a document.
  2. Build your AppleScript and add it to the KM macro (Execute AppleScript action).
  • Case 2, XPress has no AppleScript support or you are very uncomfortable with AppleScript:

  • Try to build the necessary commands with pure KM actions. Probably the only additional action you need is a Select Menu action. So, use that action to save the document.

To make sure that the document is fully opened before saving it, you might need to add a Pause action, but not necessarily.

>>> Make sure the actions are inside the For Each Path loop. Otherwise it will open all files at once and then do nothing.

In theory that should do it. In practice you might need to handle “Missing font” messages or something of that kind.

Thank you Tom - a great help - I'll see how I get on with the AppleScript route

Great!

You should find out what happens when you do a normal Save. Will it save the document in the XPress 2016 format (what is what you want, I think) or will it save in the document’s format.

If the latter is true you will have to use Save As…

And, of course, closing the document after that would be beneficial :wink:

Sorry for forgetting it.

It's almost as if they worked out the best way to screw anyone who was stupid enough to upgrade. Opening a Quark 2015 in Quark 2016 is problem free but when it comes to closing the document it give you the opportunity of not overwriting the current 2015 document and asks if you want to save. If yes it presents a save as and then "do you want to replace?". So that action is:

  1. Open
  2. Save
  3. Respond to finder save dialogue without changing the destination
  4. Respond to replace existing file
  5. Select replace option
  6. Close document

Of course a single Save as to another destination would remove 3 steps but add another step to make the next open return to the original folder.



Usually you can avoid this by doing a “Save” before closing the document. That’s why I proposed to find out if XPress is saving in the desired format (document version) when choosing “Save”.

Assuming XPress does save in your desired format (2016 probably), then something along these lines should work:

I have no possibility to test it, so please treat this as pseudo code.

  • Replace the 2× “Select menu in Front Application” with Select menu in QuarkXPress”.
  • The Replace button actions are only needed if a Replace prompt comes up. (Normally, with “Save” there is no such prompt; but since XPress may detect the document version difference, there might be that prompt.)
  • Probably other adaptations are needed as well.

_[test] XPress Save.kmmacros (5.5 KB)

Edit:

I have just read your post again:

when it comes to closing the document it give you the opportunity of not overwriting the current 2015 document and asks if you want to save.[…]

  1. Open
  2. Save
  3. Respond to finder save dialogue without changing the destination
  4. Respond to replace existing file
  5. Select replace option
  6. Close document

Do you mean, when closing the document it always asks again, even if you have done an explicit “Save” before? (as listed in your steps)

Even if you try to save, it asks if you want to replace the existing document. It does not allow a Quark XPress ver 15 document to be opened in ver 16 and then saved with a normal save command. It forces a save as. KM does not recognise the Save As menu but it works with the key combinations so I have it working with Quark ver 15. I now want to move to the machine with ver. 16 on it to do the job I bought it for. I suspect the licence is restricted to a single machine because I can't get the macro to run on the other machine.

The good news is that I think I will be able to get it to do what I want based on what I have done already.

Quark open file - intending to save each document as its current name.kmmacros (5.4 KB)

By the way - thank you for your help. It is much appreciated.

Peter

If I get it right, this is not the same as a Save As…, since it doesn’t ask for the location. I mean, when you click Replace it will – by default – always overwrite the original file, and not end up in a different folder, right? (Which is a good thing.)

In most programs the Ellipsis character in “Save As…” (and similar menu items) is written correctly as Ellipsis (Unicode U+2026, ;), but maybe the folks at Quark have no clue of typography and have written it as three dots. So try also “Save As...” with three dots at the end, instead of an Ellipsis.

But if you don’t know how a menu item is exactly written you can always use the built-in menu explorer of the KM action:

Great!

Hi Tom,

Did you see my question about using it on another machine? I am eventually moving everything to that machine, which is why I have ended up in this pickle?

According to the Wiki KM is licensed on a per-user basis and up to 5 Macs.

If the macro doesn’t run:

  1. Make sure the macro is enabled on that machine
  2. Check the paths used in the macro
  3. Pay attention to any error notifications
  4. Read the Engine.log (Keyboard Maestro > Help > Open Logs Folder)

Thank you for your help - I am now using several macros in my catalogue production workflow, which is saving hours of time. Thank you.

Great!

If you think a post has solved your problem you can check the “Problem solved” checkbox at the bottom of the post that solved your problem.