Search found 234 matches

by js
2019-10-02 05:34:27
Forum: Nisus Writer Pro Macros
Topic: Turning an integer into an array of its digits
Replies: 15
Views: 1217

Re: Turning an integer into an array of its digits

But why do you want to do this? If you want to find the keys that return such values, then why don't you just keep them (preferably in an array)? Or test on the fly? The only "advantage" of the subhash is that it will give you "key undefined" errors, if you ask about other keys. Yes. All I want is ...
by js
2019-10-02 03:15:05
Forum: Nisus Writer Pro Macros
Topic: Mark as Code
Replies: 0
Views: 194

Mark as Code

I dont' understand anymore the "mark as code" function of this forum. If I mark a line as code and press Preview, the code appears properly marked in a window on top of my Draft window. But pressing submit does send the text of my Draft window with the marking tags, but not executing them. Same thin...
by js
2019-10-02 03:03:32
Forum: Nisus Writer Pro Macros
Topic: Turning an integer into an array of its digits
Replies: 15
Views: 1217

Re: Turning an integer into an array of its digits

Interesting to have variant solutions. I tried all successfully. Thank you. I wonder if I may ask another, related question: If individual values of an hash contain several words or numbers, is there an easy way of creating a subhash with only pairs containing those words or numbers. Like $myhash = ...
by js
2019-09-29 05:38:18
Forum: Nisus Writer Pro Macros
Topic: Turning an integer into an array of its digits
Replies: 15
Views: 1217

Re: Turning an integer into an array of its digits

Thank you Philip, for your good explaining, as well as for your example hash which I would recommend Nisus to include in the Reference file.
by js
2019-09-29 04:19:35
Forum: Nisus Writer Pro Macros
Topic: Turning an integer into an array of its digits
Replies: 15
Views: 1217

Re: Turning an integer into an array of its digits

Thank you, Philip. I tried this and it works well for me. A thing I still don't quite understand is about hashes. There is a command to retrieve a value that goes with a key. But how can I retrieve the key if I know the value? Is it necessary to somehow apply the foreach function. Unfortunately I di...
by js
2019-09-27 11:00:29
Forum: Nisus Writer Pro Macros
Topic: Turning an integer into an array of its digits
Replies: 15
Views: 1217

Re: Turning an integer into an array of its digits

Thank you both Philipp and Martin. My main error was to ignore that the split function creates an array without further ado, and a lot of confusion if you do ignore that. As to the word integer I always thought that this is another word for a whole number. Is that not correct? What I wanted was in f...
by js
2019-09-27 08:54:16
Forum: Nisus Writer Pro Macros
Topic: Turning an integer into an array of its digits
Replies: 15
Views: 1217

Re: Turning an integer into an array of its digits

Thank you Philipp. It seems though that I make a mistake somewhere. My selection ("1", "2", "3", "4", "5") is put on the clipboard Following your advice I execute: $sel = Read Clipboard $arr = Array.new $arr.appendValuesFromArray $sel prompt $arr What I get is: "Expected a value of type Array, found...
by js
2019-09-27 07:08:09
Forum: Nisus Writer Pro Macros
Topic: Turning an integer into an array of its digits
Replies: 15
Views: 1217

Turning an integer into an array of its digits

I would like to transform a multi digit integer into an array made of its digits. Using the split function I can transform $int = 12345 into $list = ("1", "2", "3", "4", "5") But $arr = Array.new($list) does not produce an array with 5 elements. Rather the macro understands that my $list has only 1 ...
by js
2017-10-30 09:38:41
Forum: Nisus Writer Pro Macros
Topic: How to open a linked file in it‘s own Application ?
Replies: 4
Views: 4853

Re: How to open a linked file in it‘s own Application ?

Thank you Philip, Your macro works well. If the file name has escape characters I use it with double quotes. Thinking further about the "open URL" command, I find now that it also possible to use it for all files, non Nisus opening in their own application. Like so: $path = Choose File open URL "fil...
by js
2017-10-29 04:50:59
Forum: Nisus Writer Pro Macros
Topic: How to open a linked file in it‘s own Application ?
Replies: 4
Views: 4853

How to open a linked file in it‘s own Application ?

Nisus „Add link to file“ menug works differently after the introduction of sandbox security Before, the menu "edit link" let you edit the link. Now it shows you only the last known folder with the linked file inside. Still: if you select the link and paste it into the Terminal, you see what you earl...
by js
2017-03-20 14:50:06
Forum: Nisus Writer Pro Macros
Topic: Selecting All Text with the same background color
Replies: 5
Views: 4645

Re: Selecting All Text with the same background color

Thank you again. In fact my start position is not to chose a background color. The idea is to put the cursor into a paragraph X with para bg color Y and to have the macro select all other paragraphs that have para bg color Y. So rather than to define a para bg color I wonder what I should do to get ...
by js
2017-03-20 04:04:54
Forum: Nisus Writer Pro Macros
Topic: Selecting All Text with the same background color
Replies: 5
Views: 4645

Re: Selecting All Text with the same background color

Thank you Philippe. This is certainly good adivice for the procedure as such. This said I am not sure about a Kino micro called "select by attributes". I see that there are macros selecting style, language and font. Where you referring to one of these? But probably my question was not as precise as ...
by js
2017-03-18 03:48:58
Forum: Nisus Writer Pro Macros
Topic: Selecting All Text with the same background color
Replies: 5
Views: 4645

Selecting All Text with the same background color

Is it possible to select All Text with the same background color, no matter what other attributes are going with that text?
by js
2016-07-22 05:30:19
Forum: Nisus Writer Pro Macros
Topic: List with TOC entries
Replies: 8
Views: 5853

Re: List with TOC entries

A double thank you to philip, one for the macro itself. It does exactly what I wanted. And one for his explanations, very helful to better understand the workings of Nisus macro language.
by js
2016-07-21 11:56:26
Forum: Nisus Writer Pro Macros
Topic: List with TOC entries
Replies: 8
Views: 5853

Re: List with TOC entries

Thanks Philip for this renewed help, and explaining how to use .join(''). This is what I was hoping to get. As to your new macro, it works well. But it does the same thing as the first one: If makes a list of all headings. That fine for finding a search word within the headings themselves. In fact i...