Search found 1167 matches

by phspaelti
2021-04-26 10:15:11
Forum: Nisus Writer Pro Macros
Topic: Creating a List of all Capitalsied words
Replies: 4
Views: 356

Re: Creating a List of all Capitalsied words

I would have used PowerFind for the screen-shot, but it seems that PowerFind won't let you insert a repeat bubble with (3 or more). It creates the bubble, but it just beeps and won't insert it in the Find dialog. :(
by phspaelti
2021-04-26 10:12:31
Forum: Nisus Writer Pro Macros
Topic: Creating a List of all Capitalsied words
Replies: 4
Views: 356

Re: Creating a List of all Capitalsied words

While Martin' macro will work fine for this, one might mention that you don't really need a macro for this at all. Just create an appropriate Find expression, do "Find All" to get a non-contiguous selection and then you can copy them directly to the clipboard.
by phspaelti
2021-04-09 05:45:37
Forum: Nisus Writer Pro Macros
Topic: How to apply user hilite to selected text
Replies: 2
Views: 683

Re: How to apply user hilite to selected text

Try this instead.

Code: Select all

$myHilite = Color.newWithRGB255(255, 252, 163)
Set Highlight Color $myHilite
:wink:
by phspaelti
2021-04-06 17:07:21
Forum: Nisus Writer Pro
Topic: Removing Periods after Footnote Numerals
Replies: 3
Views: 876

Re: Removing Periods after Footnote Numerals

Because in the footnote style sheet, there is an option under "note References" where you can control the period; it appears in the "after text" box. Delete that period and it should delete it. But if my memory serves, this may depend on the version of Nisus you are running. Older versions inserted...
by phspaelti
2021-04-06 16:59:13
Forum: Nisus Writer Pro Macros
Topic: Create array from word list?
Replies: 11
Views: 1748

Re: Create array from word list?

I was just kidding. .arrayByMakingValuesDoCommand is my favorite macro language feature and I go out of my way to use it whenever I can :D I think the current Nisus macro language is a very good balance between powerful and still manageable for someone who doesn't want to become a full-time programm...
by phspaelti
2021-04-04 08:14:58
Forum: Nisus Writer Pro Macros
Topic: Create array from word list?
Replies: 11
Views: 1748

Re: Create array from word list?

B.Otter wrote:
2021-04-04 07:45:39
Up late?
So it would seem… Happens too often
by phspaelti
2021-04-04 06:57:43
Forum: Nisus Writer Pro Macros
Topic: Create array from word list?
Replies: 11
Views: 1748

Re: Create array from word list?

In way of explanation: Nisus' strong point is Find . In the macro language a Find statement used on a text object will produce a selection object, or, if you use the "Find All" option, an array of selections. So the first thing is to write the Find statement that you want. I wrote: $doc.text.find '^...
by phspaelti
2021-04-04 06:37:11
Forum: Nisus Writer Pro Macros
Topic: Create array from word list?
Replies: 11
Views: 1748

Re: Create array from word list?

Code: Select all

$doc = Document.active
$wordSels = $doc.text.find '^\w+', 'Ea'
$words = $wordSels.arrayByMakingValuesDoCommand 'substring'
$words.randomize
Document.newWithText $words.join("\n")
by phspaelti
2021-04-02 16:20:45
Forum: Nisus Writer Pro
Topic: Text-wrapping graphic on every page
Replies: 3
Views: 2277

Re: Text-wrapping graphic on every page

I am appending here a macro that will copy the first floating contents of your file to every following page. It will also make sure to copy and adjust the settings - including text flow. Note that you will need to insert the first one manually before you run this. This will probably work best if you...
by phspaelti
2021-03-30 09:28:37
Forum: Nisus Writer Pro Macros
Topic: How to create a variable for "Any digit"?
Replies: 12
Views: 3090

Re: How to create a variable for "Any digit"?

So comparing all the different digits you would join together macro code like ($number == 1) || ($number == 2) || ($number == 3) || ... … and with the added wrinkle that you will need to further combine the expressions pairwise with further parentheses. This truly reminds me of Mark Twain's essay T...
by phspaelti
2021-03-29 18:03:27
Forum: Nisus Writer Pro Macros
Topic: How to create a variable for "Any digit"?
Replies: 12
Views: 3090

Re: How to create a variable for "Any digit"?

martin wrote:
2021-03-29 11:24:02
$searchRange = Range.new(0, $selection.location)
$foundSelection = $selection.text.find('\d+', 'Er', $searchRange)
That's been one of those features that I have been looking for for some time now. Seems it was introduced in NW 3.0 but it slipped by me for some reason. :drunk:
by phspaelti
2021-03-29 07:02:43
Forum: Nisus Writer Pro Macros
Topic: How to create a variable for "Any digit"?
Replies: 12
Views: 3090

Re: How to create a variable for "Any digit"?

If you understood all that you can now squeeze the whole logic into one statement like this: $sel = TextSelection.active if $sel.text.substringInRange(Range.new($sel.location - 1, 1)).find('\d','E') prompt 'digit' else prompt 'not a digit' end But whether that's recommended is another question :lol:
by phspaelti
2021-03-29 06:51:50
Forum: Nisus Writer Pro Macros
Topic: How to create a variable for "Any digit"?
Replies: 12
Views: 3090

Re: How to create a variable for "Any digit"?

if $theFoundCharacter = ? … else … end How can I replace the question mark with something that indicates "Any digit" or that a digit was found? Here the first thing to note is that if you want to test a variable you will need to use the double equal sign "==", not just a single one. So you could te...
by phspaelti
2021-03-29 06:50:57
Forum: Nisus Writer Pro Macros
Topic: How to create a variable for "Any digit"?
Replies: 12
Views: 3090

Re: How to create a variable for "Any digit"?

I need to find out whether the character that precedes the insertion point is a number or not. In case it's a number, the macro will do some stuff. In case it's not, the macro will do some other stuff. How can I do that? I tried $theFoundCharacter = Find @Text<\X>, 'rE' This will not give you what ...
by phspaelti
2021-03-01 16:58:59
Forum: Nisus Writer Pro
Topic: Initials
Replies: 18
Views: 13351

Re: Initials

I'm sorry that you had such trouble. If you can save a document with problems like that you might want to share it (Perhaps with Nisus using the feedback button. Tell them I sent you :P ) I just tried a very simple test: 10 Pages of copied text. I randomly inserted 17 Drop Caps without a hitch. My s...