Search found 45 matches

by Nobumi Iyanaga
2008-06-25 17:07:48
Forum: Nisus Writer Pro Macros
Topic: rangeOfAttributesAtIndex
Replies: 5
Views: 13838

rangeOfAttributesAtIndex

Hello, In Nisus Macro Reference, I find in the explanation for "text.rangeOfAttributesAtIndex" a sentence saying: This range is not necessarily the longest (maximal) range over which attributes are equal, eg: text adjacent to the returned range could have the same attributes. What does thi...
by Nobumi Iyanaga
2008-05-24 01:36:36
Forum: Nisus Writer Pro
Topic: Nisus Writer Pro 1.1 Released
Replies: 17
Views: 22286

Hello, When installing 1.1 Beta, it asked whether I wanted to allow changes to the macros. I naturally said "no" -- this was a beta after all. A second installation did not offer the option. You said you would try to get this fix to happen with 1.1 when it came out. Did it happen? No dialo...
by Nobumi Iyanaga
2008-05-21 18:09:28
Forum: Nisus Writer Pro Macros
Topic: Perl output messed up
Replies: 13
Views: 26785

Hello Kino and Martin, Thanks for your replies and your consideration. I too am very much surprised and impressed by the richness of the new commands introduced in NW Pro 1.1. beta; the documentation is still to be improved, but it has the essential. I think we, users, should also work to make some ...
by Nobumi Iyanaga
2008-05-19 06:57:44
Forum: Nisus Writer Pro Macros
Topic: Perl output messed up
Replies: 13
Views: 26785

Re: Perl output messed up

Hello Kino, Thank you for your reply. That is not a NW Pro problem but what you always get even from a script run in Terminal, when backticks are used to receive something from an external program. As perl does not know the encoding of the output, the UTF-8 flag is not turned on automatically. I don...
by Nobumi Iyanaga
2008-05-15 17:14:23
Forum: Nisus Writer Pro Macros
Topic: Perl output messed up
Replies: 13
Views: 26785

Hello Martin, Thank you for your reply. This is exactly how embedded perl blocks work. However, it is necessary for the correct functioning of the NWP macro system, which requires that the perl output be encoded using UTF-8. .... Honestly I would consider this a bug in perl. The identity of the char...
by Nobumi Iyanaga
2008-05-14 16:46:56
Forum: Nisus Writer Pro Macros
Topic: Perl output messed up
Replies: 13
Views: 26785


by Nobumi Iyanaga
2008-05-14 04:17:17
Forum: Nisus Writer Pro Macros
Topic: Perl output messed up
Replies: 13
Views: 26785

Perl output messed up

Hello,

I want to write a macro like the following:

Code: Select all

$res = ""
Begin Perl
   $res = `/usr/bin/perl ~/Desktop/myPerlScript.pl`;
End

New
Insert Text $res
If the perl script "~/Desktop/myPerlScript.pl" has a code like the following:

Code: Select all

#!/usr/bin/perl
binmode (STDOUT, ":utf8");
print "あいうえお";
the result will be a mess (something like "ãÂ￾‚ãÂ￾„ãÂ￾†ãÂ￾ˆãÂ￾Š").

Even if I remove the line 'binmode (STDOUT, ":utf8")', I get an even worse result.

How can I get the expected result?

Thank you in advance.
by Nobumi Iyanaga
2008-04-27 15:40:13
Forum: Nisus Writer Pro Macros
Topic: Extract HTML and images from document
Replies: 7
Views: 17428

Hello, I wrote: Related to your script, I think it is still necessary to read the raw rtf code, for instance for grabbing images. But with the new macro, it would be much easier -- or faster to do that. You would do: Find All '^.+', 'E' $doc = Document.active $paragraphs = Array.new $paragraphs = $d...
by Nobumi Iyanaga
2008-04-20 20:41:49
Forum: Nisus Writer Pro Macros
Topic: Extract HTML and images from document
Replies: 7
Views: 17428

Hello Jerry, Related to your script, I think it is still necessary to read the raw rtf code, for instance for grabbing images. But with the new macro, it would be much easier -- or faster to do that. You would do: Find All '^.+', 'E' $doc = Document.active $paragraphs = Array.new $paragraphs = $doc....
by Nobumi Iyanaga
2008-04-19 06:41:56
Forum: Nisus Writer Pro Macros
Topic: converting Classic fonts with non-standard encodings
Replies: 7
Views: 21126

Hello Martin, I tried to write a conversion map for the font "Norman" using your "NSAramian to Unicode.nwm" as template. It seems to work more or less -- I have not yet checked the result very closely. Anyway, I will re-write this macro when you will update the command "tran...
by Nobumi Iyanaga
2008-04-18 16:27:04
Forum: Nisus Writer Pro Macros
Topic: converting Classic fonts with non-standard encodings
Replies: 7
Views: 21126

Hello Martin, I am trying to make a mapping table for a transliteration font for East Asian languages, but found a problem: that is, there are many glyphs that can be only obtained using combining characters. For example, U+0072 + U+0325 + U+0304, etc. I think with the new "$text.transliterateI...
by Nobumi Iyanaga
2008-04-18 16:03:18
Forum: Nisus Writer Pro Macros
Topic: Extract HTML and images from document
Replies: 7
Views: 17428

Yes, the new macro Attributes object should provide useful. It is however not complete- there is still formatting information that needs to be made available. If there's any particular piece of information you find more critical than another, let us know so we can prioritize it for future enhanceme...
by Nobumi Iyanaga
2008-04-18 00:43:26
Forum: Nisus Writer Pro Macros
Topic: Extract HTML and images from document
Replies: 7
Views: 17428

Hello capvideo, Although I have not yet tried or understood your scripts, I am very impressed by them. They seem really very good. I will try them, and try to study them. You write in your web page: it’d be a whole lot nicer (and likely more reliable) if I could get the style names directly from Nis...
by Nobumi Iyanaga
2008-04-17 23:33:29
Forum: Nisus Writer Pro Macros
Topic: converting Classic fonts with non-standard encodings
Replies: 7
Views: 21126

Hello Martin, This is a very good idea! I worked a lot in this area. See my web page "East Asian Diacritical Fonts and Unicode" http://www.bekkoame.ne.jp/~n-iyanag/researchTools/diacriticalfontsandunicode.html and "Classic Nisus Writer to Nisus Writer Express/Pro" http://www.bekk...
by Nobumi Iyanaga
2008-04-15 06:30:07
Forum: Nisus Writer Pro
Topic: Convert many files
Replies: 8
Views: 14531

Re: batch conversion

Hello igroucho, I have loads of Nisus files saved from a mac belonging once to my passed away father. All dating back as early as 91-92. I'd like from various reasons, among all pc-comp, to convert them to MsWord files. When I open a file in Nisus it's opened as "Untitled" but I'd like NW ...