Thanks for the quick response.  I don't have time to try it before work,
but I will try it tomorrow.

What I'm after is a single .ijs file produced by Project Manager that
will require the minimum number of support files e.g. j.dll, j.exe,
ima3.dll etc.  All these files will exist in the same directory along
with an icon with the target line of:

       path/j.exe -profile transform_m.ijs

A line would be added to the end of transform_m.ijs:

     transformimage_run ''

Which would start the application.

Thanks again,
Dave

Devon McCormick wrote:
> David -
> 
> Does the following do what you want?  It has a little cruft around the
> anonymous function at the end which runs the transform main window.  This
> cruft is for parsing the command-line for arguments to be passed into the
> code.
> 
> I don't remember off the top of my head how to hide or do without the
> session window but at least the former of these is possible.
> 
> Good luck,
> 
> Devon
> 
> NB. ------------ J script follows ------------
> NB.* transformSA.ijs: Standalone image transforms
> 
> invokeThis=: 0 : 0
>    "C:\Program Files\j602\bin\j.exe" c:\amisc\JSys\user\code\TransformSA.ijs
> -rt
> )
> 
> addon_path=: jpath '~addons/media/image3/'
> require addon_path,'transform_m.ijs'
> 
> setGlobalParms=: 3 : 0
>    PIC=: ,>'c:\amisc\pix\Utah_teapot.jpg' lookupValAfterName ARGV_z_;<'PIC'
>    DEBUGON=: >0 lookupValAfterName ARGV_z_;<'DEBUGON'
>    ans=. ans,:".&.>ans=. 'PIC';'DEBUGON'
> )
> 
> lookupValAfterName=: 3 : 0
> NB.* lookupValAfterName: given vec of name, value pairs, return value for
> each
> NB. name specified; return default value x if no name found.
>    '' lookupValAfterName y
> :
>    try.
>        'vnvec names'=. split y
>        wh=. names i.~vnvec=. >vnvec
>        val=. (>:wh){vnvec,2$<x NB. Return default x for invalid name.
>    catch. val=. boxopen x end. NB. val boxed because may be multiple parms
> NB. VAR=: 'Default' lookupValAfterName ARGV_z_;'CMDLNVAR'
> )
> 
> NB.* : only invoke if not loaded via interactive session.
> 3 : 0 ''
>    if. -.ARGV_z_ +./ . e. '-rt';'-jijx' do.
>        smoutput 'ARGV_z_: ',;ARGV_z_,&.>' '
>        return.
>    end.
>    setGlobalParms ''
>    transformimage_run PIC
> )
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to