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

7721Re: Macro question: place variable in Mac OS clipboard?

Expand Messages
  • em315
    Mar 21 5:03 PM
      That's exactly what I did in the version that I posted yesterday. I used an Applescript to prompt the user for a default zoom level; then I save it to the clipboard so that WP can copy it from the clipboard to a global variable, which is used by the OnOpenDocument macro (and a New Document Template is in the Templates folder so that new documents get the same zoom level).

      The same Applescript saves a text file that contains the zoom-level number.

      An OnStartup macro that runs when WP starts up runs an Applescript that reads the text file for the zoom-level number and copies it to the clipboard - so that the WP macro can copy the number from the clipboard to a global variable. It seems to work.

      Again, this is entirely your idea - I just banged my forehead on the trackpad until the code seemed to work.


      --- In wordperfectmac@yahoogroups.com, "John R" <johnrethorst@...> wrote:
      >
      > I don't know of a way to do that. But again (see last post), I'd try to generate a value in Applescript and pass that to WP instead of the other way around.
      >
      > John R.
      >
      >
      >
      > --- In wordperfectmac@yahoogroups.com, "em315" <em315@> wrote:
      > >
      > > Now that you've answered one question, may I bother you with another:
      > >
      > > Can I use an AppleScript to get the value of a Global Variable in WordPerfect?
      > >
      > > In other words, is it possible to have an AppleScript that says something like this:
      > >
      > > tell application "WordPerfect"
      > > set myVar to GlobalVar26
      > > end tell
      > > tell me to activate
      > > display dialog myVar
      > >
      >
    • Show all 14 messages in this topic