Search found 45 matches
- 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...
- 2008-05-24 01:36:36
- Forum: Nisus Writer Pro
- Topic: Nisus Writer Pro 1.1 Released
- Replies: 17
- Views: 22286
- 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 ...
- 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...
- 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...
- 2008-05-14 16:46:56
- Forum: Nisus Writer Pro Macros
- Topic: Perl output messed up
- Replies: 13
- Views: 26785
- 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:
If the perl script "~/Desktop/myPerlScript.pl" has a code like the following:
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.
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
Code: Select all
#!/usr/bin/perl
binmode (STDOUT, ":utf8");
print "あいうえお";
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.
- 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...
- 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....
- 2008-04-19 06:41:56
- Forum: Nisus Writer Pro Macros
- Topic: converting Classic fonts with non-standard encodings
- Replies: 7
- Views: 21126
- 2008-04-18 16:27:04
- Forum: Nisus Writer Pro Macros
- Topic: converting Classic fonts with non-standard encodings
- Replies: 7
- Views: 21126
- 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...
- 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...
- 2008-04-17 23:33:29
- Forum: Nisus Writer Pro Macros
- Topic: converting Classic fonts with non-standard encodings
- Replies: 7
- Views: 21126
- 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 ...