Reply to topic  [ 4 posts ] 
Conditionals 
Author Message

Joined: 2008-02-26 13:46:29
Posts: 18
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?


2008-03-10 08:36:11
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
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:
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.


2008-03-10 12:36:42
Profile WWW

Joined: 2008-02-26 13:46:29
Posts: 18
Post 
Quote:
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.


2008-03-11 07:41:30
Profile
User avatar

Joined: 2007-01-17 03:25:42
Posts: 729
Post 
'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.


2008-03-11 08:45:54
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software