Loading ...
Sorry, an error occurred while loading the content.

7528Re: WPMac macro question

Expand Messages
  • John R
    Nov 20, 2012
    • 0 Attachment
      That's easy enough. A WP macro that makes a document and saves it in a given place with a given name is:

      New Document
      Type ( ); a space
      Save As ("Hard Disk:Users:HomeFolder:MakePDF")
      Close

      The path has to be more or less hard-coded though. WP only knows the path to the startup disk and to its application folder. But if you run the macro from an Applescript you can pass the file name and path to the macro as:

      tell application "WordPerfect"
      Do Script {"MakePDFmacro", "Hard Disk:Users:HomeFolder:MakePDF"}
      end tell

      and the macro would then be:

      New Document
      Type ( )
      Save As (ScriptVar01)
      Close




      --- In wordperfectmac@yahoogroups.com, "em315" <em315@...> wrote:
      >
      > I was afraid of that. Would it be possible for a PDF-writing macro to do the following:
      >
      > 1. Write a file to the same folder to which the print file will be written; the file will be named something like MakePDF.
      >
      > 2. Then write the print file to the same folder.
      >
      > Meanwhile, on the OS X side, the folder action script will see that a MakePDF file has been written, and will wait (say) one minute for a .PS file to be written to the same folder. If a .PS file does get written in that period, the folder action script will delete the MakePDF file and convert the .PS file to a PDF file, with the same name as the name part of the .PS file. If the name of the .PS file begins with "untitled" (or whatever WP uses), then the PDF file will get an arbitrary filename based on the current date and time.
      >
      > Does this sound plausible? This is somewhat similar to the way the PDF-writing macro works in the system I've devised for using WPDOS under OS X.
      >
      > --- In wordperfectmac@yahoogroups.com, "John R" <johnrethorst@> wrote:
      > >
      > > I don't see how a WP Mac macro could do this. A folder action script could change the name of a file that lands in the folder, but would need a basis for the decision whether to change the name.
      > >
      > > John R.
      > >
      > >
      > >
      > > --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
      > > >
      > > > This is a question for John and any other expert:
      > > >
      > > > Is it possible for a macro to do the following:
      > > >
      > > > If printing to a virtual printer (a "printer" that creates a PostScript file), when the Save dialog opens, change the name of the output file so that (for example) the name filename.ps is changed to something like filename-pdf.ps.
      > > >
      > > > The point of this is to modify the filename so that, when the file is saved to a folder in OS X, a folder action script attached to that folder can recognize the "-pdf.ps" in the name, and automatically create a PDF file.
      > > >
      > > > This can't be recorded. Is it possible to write such a macro?
      > > >
      > >
      >
    • Show all 15 messages in this topic