7721Re: Macro question: place variable in Mac OS clipboard?
- Mar 21 5:03 PMThat'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 email@example.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 firstname.lastname@example.org, "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
- << Previous post in topic Next post in topic >>