Re: Can a macro modify an existing macro?
That's excellent detailed advice. It's possible to create a magnification macro even more easily: simply create a macro with the line "Magnification(120.0)" (without the quotation marks), using whatever magnification you prefer. That can be the default in all documents, new and existing, by performing two steps:
1. Include the line "Magnification(120.0)" or whatever number you prefer in a macro called OnOpenDocument. This will apply the magnification to existing documents when opened.
2. Create an empty file named New Document Template in the Templates folder. The existence of this file will cause the OnOpenDocument macro to apply the magnification to new documents also.
John has suggested a way to read the 120.0 (or whatever number) from a file, so that a user can run a macro or Applescript that creates that file, and WP can then read the file to determine which magnification to use.
I've got this working, but it conflicts with John's routines for closing any existing empty windows when opening a document and I haven't figured out how to make the two co-exist.
--- In email@example.com, "darylngee" <darylngee@...> wrote:
> Ed and all,
> I don't think we can create this modifiable macro. I created a macro that magnifies the (entire) text of a document by doing this:
> Open the Layout Bar (the one that shows formatting, columns, create tables, and magnification, super- or sub-script, etc.)
> 1. Under Tools, click on Macro / Record...
> 2. A window appears: Choose a Name for your macro (mine is called Bigger); fill in a description if you wish; then click Assign.
> 3. Type a key combination. WP will a) show you what keys you've chosen, and it will also b)show if the key combination is already used. For instance, if you type Control-B, WP will say that Control-B is for Bold-facing. In my case, I chose Command-Option-B.
> 4. Choose a magnification. You must do thisat this time, if you try to create a macro that leads you to the dialogue box for magnification percentage, the Layout line goes gray and you can't choose anything else at all. What I mean is that you can't stop the macro recording at this point with the dialogue box still open. (I chose 150%; you can choose anything you wish.)
> 5. After you choose a magnification, go back to Tools / Macro and click "Stop recording."
> Henceforth, when you type the key combination, your entire screen will show the text in that magnification. If you want to change it, you can go to the Layout bar, go to the Magnification, and choose whatever else you want. Or you can go the Show Codes, find the magnification, and delete it, and then the document will go to your default magnification. Or you could create a macro for another magnification greater than or less than the first one.
> You could modify your current magnification setting by going to Tools / Macro / Edit. A window will appear that says something like, Macro:Bigger[or whatever you named it]. Here you can change the number/percentage magnification. Save and close.
> Sorry that I could not create a variable macro. Perhaps some other scriptApplescript?? I don't think you can do this in the Preferences (where you can choose to show / hide bars upon opening WP), but perhaps there's someplace else where one could get a customized default opening magnification. I may even dream up something in my sleep. At one point, I recall that you could tell Macs to open things other than the OS when you started up. I think you can still do this, but not with the Macro Ed suggests.
> Daryl Chinn
> Poet, Teacher, Editor
> --- In firstname.lastname@example.org, "em315" <em315@> wrote:
> > These are very ingenious ideas. Thank you. By combining them, it should be possible to set a default zoom level for WP with minimal effort by the user. Will experiment with it.
> > --- In email@example.com, "John R" <johnrethorst@> wrote:
> > >
> > > A macro could open a document stuck away in, say, Preferences > WordPerfect, that has only the number 120 in it, read and then close that document, and use the number for magnification, in OnOpenDocument or anywhere.
> > >
> > > A macro can contain the line:
> > > Execute Apple Script ("name of script") [note: name only, not path. WP finds it.]
> > > which could put the number on the clipboard for the macro's use.