I made these changes in the latest scripts (018). Thanks for the
suggestions.
Sherlock, Ric wrote:
This works fine for me as long as a web browser is defined in
Edit|Configure|External Programs. If not, I also get the following
error.
------
error in: pmview_binfo_button
domain error: wd
wd'winexec *',cmd
------
I think this is because the command for calling the default browser
(browser_view and dfltbrowser_jbrowser_) currently resolves under win32
as:
wd 'winexec * "<url>"'
Which doesn't work. The following would:
wd 'winexec ',DEL,'cmd /C start "" "<url>"',DEL,'sw_hide'
To fix the problem I'd consider changing launch_jbrowser_ to work with
URLs as well as filenames and then use it rather than duplicating the
same mechanism in browser_view. I don't think this would be too hard.
For example ...
launch[6] from:
cmd=. 'cmd /C ',quoteit cmd
to:
cmd=. 'cmd /C start "" ',quoteit cmd
and a mechanism for recognizing a url rather than a filename in the
following else. block. Example ...
else.
browser=. quoteit browser
if. (# <: '://' i.&1@:E. ]) cmd do.
cmd=. '/' (I. cmd='\') } cmd
cmd=. 'file://',cmd
end.
cmd=. quoteit cmd
cmd=. browser,' ',cmd
show=.''
end.
browser_view in pacman.ijs could then be simplified to just:
browser_view=: 3 : 0
require '~system/extras/util/browser.ijs'
launch_jbrowser_ y
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm