Well for 'media/imagekit' it uses GUI so the JQt is required. jconsole
does not work.
As of j9.6.0-beta16, jqt can read file provided command line
arguments, however jqt would not print output to the terminal stdout.
Assuming you are using a Unix like system, it is possible to work
around that by letting J write output to a named pipe created by mkfifo.
$ mkfifo ~/out
$ jqt ~/test.ijs
$ cat test.ijs
require 'media/imagekit'
require 'format/printf'
img =: jpath '~/test.png'
pip =: jpath '~/out'
a =: read_image img
NB. 5!:_1 is a unexposed foreign function
NB. that print a noun to string the same
NB. way it is printed to terminal
fmt =: 1 80 20 20&(5!:_1)
(fmt a) (1!:2) < pip
exit 0
>>>>> In <
CAD2jOU9iN5VKBqS8wOLP7gWW...@mail.gmail.com>
>>>>> Raul Miller <
rauld...@gmail.com> wrote:
Raul> $ echo 'exit echo i.3 3' >test.ijs
Raul> $ /c/Other/j9.6/bin/jconsole test.ijs
Raul> 0 1 2
Raul> 3 4 5
Raul> 6 7 8
Raul> $
Raul> Except you probably have jconsole installed to a different location.
Michael>
Michael> Hello J Software community, Firstly, I am a beginner to J, as
Michael> of yesterday. It is great! I think it is really cool. So
Michael> here is my probably simple question: I have been struggling
Michael> to find a way to run .ijs script files from the command
Michael> line. Specifically, running them from JQT, since I am using
Michael> the imagekit package (I have already tried jconsole which
Michael> doesn’t work with the imagekit package).
Michael>
Michael> So how do people run there script files without having to
Michael> enter them into the JQT interface each time? I have tried to
Michael> look, but haven’t found anything yet.
Michael>
Michael> For completeness this is my basic code so far, running version J9.5:
Michael>
Michael> load 'media/imagekit'
Michael>
Michael> NB. must use absolute path
Michael> img =: '/Users/michaeltimmers/Desktop/ferrari.jpg'
Michael> a =: read_image img
Michael> $a