We seem to have to wait a while before we'll be able to get NW X. So
perhaps it would not be totally meaningless to post a feature request
to the official list?
Maybe some of you would remember the thread "scripting language in NW
X" discussed on the Dartmouth list in the last year. At that time, I
suggested to implement into NW macro language a mechanism to interact
with a perl/shell command.
<http://www.its.unimelb.edu.au/hma/pub/nisus/d371/0090.html>
I got that idea from TextExtras. Its Pipe enables you to manipulate the
selected text in the edit window of a Cocoa application with a shell
command/script. The latest version 1.7 has been much improved and now
you can do a kind of Execute Selection on a script you are writing now.
<http://www.lorax.com/FreeStuff/TextExtras.html>
I find it very handy and frequently use it mainly with TextEdit. Don't
misunderstand my words. I'm just a newbie in perl and my few scripts
are one liners which would compensate the lack of grep find/replace in
TextEdit.
Anyway I use it a lot especially since I learnt from Nobumi how to
construct a script to process strings in utf-8 with perl 5.8.0. That
was just a few days ago ;-) It's amazing. I know almost nothing about
perl, but the almost nothing I know enables me to do almost everything
I need. Regex composed of mixed script does work just fine in s///g --
replace all -- and tr///. The last command tr/// -- translate
characters -- is very handy, for example, when you want to convert a
strings originally written in a fake MacRoman transliteration font into
utf-8. I think it to be an invaluable command for many of multi lingual
NW users.
But what is annoying for a NW user I am is that TextExtras or a script
executed via TextExtras does not allow me to call a menu command
belonging to the application. You cannot even make it open a new
document window in TextEdit. Another annoyance is the inability to
control style/formatting at all. What you can do very easily with a NW
macro like selecting some text portions by PowerFind Pro and apply
Italic style on them is impossible with a *pure* perl script.
So I'd like to have the ability to exchange data between NW macro and
perl/shell commands in NW X. In other words and for example, the
ability to send strings selected non-contiguously to perl and replace
them with those processed by perl one by one so that perl/shell process
does not affect style attributes of non selected portion.
Is this possible? I think it's not so difficult to achieve since, a
part from TextExtras, there seem to be some Services plug-ins which
work as an intermediate between a Cocoa app and shell. And TextExtras'
User Scripts are menu commands which *should* be available in NW X too.
And presumably NW X will be provided with a macro language which,
presumably again, can manipulate menu commands, clipboard, etc.
Thus I assume it would be possible ;-) to implement such a
functionality to NW X macro language. And then, I'd like to request the
ability to specify the path of perl or other commands. Most of the
things I find marvellous in perl is feasible with perl 5.8.0 only. Not
with perl 5.6.0 included in OS X 10.2 as explained in one of its man
pages.
Starting from Perl 5.6.0, Perl has had the capacity to
handle Unicode natively. Perl 5.8.0, however, is the first
recommended release for serious Unicode work. The
maintenance release 5.6.1 fixed many of the problems of the
initial Unicode implementation, but for example regular
expressions still do not work with Unicode in 5.6.1.
<http://www.perldoc.com/perl5.8.0/pod/perluniintro.html>
And the install location of perl 5.8.0 is not the same for everyone.
Some people installed it over the default perl 5.6.0 which is in
/usr/bin/. Some other people have it in /usr/local/bin/ or
/opt/perl/bin/ or somewhere else. Without the ability of specifying the
path, it would be somewhat difficult to use the hypothetic interactive
feature advantageously.
This problem is not limited to perl only. As some of you would know, OS
X's locate does not understand non-latin languages whereas locate
included in GNU Findutils handles Japanese file/folder names very well.
So if it will be possible to call locate from within NW macro, I'd like
to use locate included in that GNU package which is not situated in the
same path as no-locate-Japanese-files imposed by Apple.
Perhaps Apple Script could satisfy some of lacks mentioned above. But I
know nothing about it and it would be hard for me to learn more than a
language at the same time ;-)
Kino
---------------------------------------------------
The Nisus Interactive List
[EMAIL PROTECTED]
Searchable archives:
http://www.mail-archive.com/nisus-interactive%40nisus.com/
To unsubscribe from this list please send a message with "unsubscribe
nisus-interactive" in the body of the email to [EMAIL PROTECTED]
- Re: NW X feature request (Macro language) Kino
- Re: NW X feature request (Macro language) Nobumi Iyanaga
- Re: NW X feature request (Macro language) Kino
- Re: NW X feature request (Macro language) Geoffrey Heard
- Re: NW X feature request (Macro language) Nobumi Iyanaga
- Re: NW X feature request (Macro language) Kino
- Re: NW X feature request (Macro language) leif halvard silli
- Re: NW X feature request (Macro language) Nobumi Iyanaga
- Re: NW X feature request (Macro language) Kino
