Page 1 of 1

Conditionals

Posted: 2008-03-10 08:36:11
by mwiseman
I'd like to have a macro ensure that the Menu Command "View:Show Invisibles" is "On."

I see I can toggle it "On" and "Off" with the simple line of:

View:Show Invisibles

But is there a way to do a conditional?

This example does not work:

#Toggle On Invisible Characters
If ‘View:Show Invisibles’ = ‘False’
View:Show Invisibles
end


What would work?

Re: Conditionals

Posted: 2008-03-10 12:36:42
by martin
There is currently no way to check the state of "show invisibles". However, even if there were, your code would not work for two reasons. First "=" is an assignment. If you want to compare two values you should use "==". Also 'False' is a string that is not the same as the keyword false (or False). Thus the hypothetical code would be:

If 'View:Show Invisibles' == false

That said, turning invisibles on unconditionally is possible using this simple line:

Code: Select all

Set Invisibles Shown true
You can find a list of all available commands in the Nisus Macro Reference, which is distributed in the NWP disk image.

Posted: 2008-03-11 07:41:30
by mwiseman
You can find a list of all available commands in the Nisus Macro Reference, which is distributed in the NWP disk image.
Can you tell me where I would find this. I have search "help.pdf" and I see Nisus Macro Reference mentioned in the NWP 1.0.3 release notes under changes for 1.0.2, but I do not find a Nisus Macro Reference anywhere. I have found pp234-264 and pp317-339 of the "help.pdf" useful. While "invisibles" shows up in several places in the "help.pdf" I do not see it in the context of a "list of available commands."

I really appreciate your help. and the "Set Invisibles as true" line is exactly the solution I was looking for.

I'd love to see more documentation. I'd also be happy to participate in indexing and bookmarking "help.pdf" I've been creaking my own as I go. I'm sure other would appreciate bookmarks, too.

Posted: 2008-03-11 08:45:54
by Hamid
'Nisus Macro Reference' file (with bookmarks) was included in the 'Read Me' folder on the same disk image 'Nisus Writer Pro' which contained NWP 1.0.3.