Search found 251 matches

by js
2022-11-05 13:38:09
Forum: Nisus Writer Pro Macros
Topic: Table: How to find coordinates of selected cells
Replies: 4
Views: 270

Re: Table: How to find coordinates of selected cells

Thank you Philip, as many times before. Both macros work very well.
by js
2022-11-03 07:03:29
Forum: Nisus Writer Pro Macros
Topic: Table: How to find coordinates of selected cells
Replies: 4
Views: 270

Re: Table: How to find coordinates of selected cells

Thank you Philip. What I try to do is checking which cells in a table have been selected, either manually, or by a Find expression. This is to study mathematical and geometrical relationships inside a matrix. Take a simple example like this: Build an 8x8 matrix and fill it with decimal numbers from ...
by js
2022-11-03 03:03:00
Forum: Nisus Writer Pro Macros
Topic: Table: How to find coordinates of selected cells
Replies: 4
Views: 270

Table: How to find coordinates of selected cells

In a table, if I know the coordinates x,y of a cell I can use "$tbl.textAtRowAndColumn x,y" to find the contents of that cell.
But what is the best way to achieve the inverse: to find the coordinates of a selected cell, or better: to get an array of the the coordinates of all selected cells?
by js
2022-07-18 08:27:14
Forum: Nisus Writer Pro Macros
Topic: Change identical style in several files
Replies: 16
Views: 1820

Re: Change identical style in several files

For a single import, I tried to profit from everybodys help and suggestions to end with a handy macro like this. It lets the user choose from the style library and provides for sandboxing. Thank you all. $doc = Document.active # choosing the style set from Style Library: $folderPath = '/Applications...
by js
2022-07-16 00:12:11
Forum: Nisus Writer Pro Macros
Topic: Change identical style in several files
Replies: 16
Views: 1820

Re: Change identical style in several files

Thanks again to all who have been helping. Combining elements of what I learned I found that a single import can be done comfortably like this: $doc = Document.active # choosing the style set from Style Library: $folderPath = '/Applications/nisus writer settings/Style Library/' File.requireAccessAtP...
by js
2022-07-14 09:41:05
Forum: Nisus Writer Pro Macros
Topic: Change identical style in several files
Replies: 16
Views: 1820

Re: Change identical style in several files

Well thank you Philip. What I sure learned from all this is that to solve my problem I should use the style library. Now what I did is this: -- I created a new file, entered some text and gave it some paragraph styles. -- This I saved to the style library in a new document I called test -- I opened ...
by js
2022-07-13 10:21:03
Forum: Nisus Writer Pro Macros
Topic: Change identical style in several files
Replies: 16
Views: 1820

Re: Change identical style in several files

Great thanks to everybody helping to solve the problem. With “that’s easy” I meant to say: easy to do manually. As to the “# do stuff here” part using the loop macros suggested by Philip or Martin, I think it could be done like this: Open one of the files to be treated by the macro Manually attribut...
by js
2022-07-12 11:52:40
Forum: Nisus Writer Pro Macros
Topic: Change identical style in several files
Replies: 16
Views: 1820

Change identical style in several files

I have a number of files using certain named styles in common. Opening one file and changing the attributes of a style is easy. But how about changing that same style in all other files?
by js
2022-07-12 04:50:14
Forum: Nisus Writer Pro Macros
Topic: Glossary item executed inside a Macro?
Replies: 3
Views: 583

Re: Glossary item executed inside a Macro?

Great. Thank you Philip. I didn't realize that there is an Expand Glossary Command. I see moreover that it works either with the shortcut seleted or with the cursor placed at its end.
by js
2022-07-12 02:28:27
Forum: Nisus Writer Pro Macros
Topic: Glossary item executed inside a Macro?
Replies: 3
Views: 583

Glossary item executed inside a Macro?

I wonder if a Nisus glossary entry, normally executed manually by Space or Return, can be executed inside a macro. Having the Macro type Space or Return does not execute the Glossary.
by js
2021-04-09 03:19:03
Forum: Nisus Writer Pro Macros
Topic: How to apply user hilite to selected text
Replies: 2
Views: 7322

How to apply user hilite to selected text

I think a user hilite can be defined like this:

$myHilite = Color.newWithRGB(255, 255, 163)
Set Highlight Color $myHilite

But how can myHilite be applied to the acutal text selection?
by js
2019-11-06 11:09:56
Forum: Nisus Writer Pro Macros
Topic: Get the caret out of a table
Replies: 10
Views: 16570

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

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 Pal...
by js
2019-11-05 09:21:22
Forum: Nisus Writer Pro Macros
Topic: Get the caret out of a table
Replies: 10
Views: 16570

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?