Search found 239 matches

by js
2019-11-06 11:09:56
Forum: Nisus Writer Pro Macros
Topic: Get the caret out of a table
Replies: 10
Views: 1480

Re: Get the caret out of a table

Thank you Philip. This was very helpful indeed. Everthings works fine now, including your macro earlier revised. (Didn't know that you can modify earlier posts, so I didn't check). Of course it's far easier to shade cells than paragraphs in a table. But I am glad to know how it works for paragraphs ...
by js
2019-11-05 09:36:29
Forum: Nisus Writer Pro Macros
Topic: Get the caret out of a table
Replies: 10
Views: 1480

Re: Get the caret out of a table

You showed how to create shading attributes with a macro, and then asked: But maybe your problem is something else? How are you getting/making the table selection? To answer that: I made selections manually, by selecting (some or all) text within some cells. The menu "Show Paragraph Shading Palette"...
by js
2019-11-05 09:21:22
Forum: Nisus Writer Pro Macros
Topic: Get the caret out of a table
Replies: 10
Views: 1480

Re: Get the caret out of a table

Thanks for explaining in detail. I think my problem was that I took the index of the table's start to be it's first cell.
About your short form of the macro you say "that should be fixed now". Did you maybe intend to post the fixed code?
by js
2019-11-04 10:35:26
Forum: Nisus Writer Pro Macros
Topic: Get the caret out of a table
Replies: 10
Views: 1480

Re: Get the caret out of a table

Thank you, Philip. Outquoting the line "$textRange.location = $textRange.bound" works fine. Some day I might understand why )=;
Your simplified version produces a system complaint: 'The Table object does not have a "text" property'.
by js
2019-11-04 06:21:20
Forum: Nisus Writer Pro Macros
Topic: Get the caret out of a table
Replies: 10
Views: 1480

Get the caret out of a table

My document starts with a table If the cursor is inside the table "Select Start" as expected selects the first cell of the table. If the cursor is after the table outside of it "Select Start" quite unexpectedly also selects the first cell of the table. Same thing after applying "Select All Document“...
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: 3388

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: 1058

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: 3388

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: 3388

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: 3388

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: 3388

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: 3388

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: 3388

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: 5141

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: 5141

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...