On Wednesday, November 21, 2012 12:02:59 AM UTC+1, José M. C. Quintas wrote:
Don't works means that an window is open, I can't see what happen
because occurs in less than one second, can't pause, seems an empty
window.
If BAT have "pause", pause don't occurs.
There are clients using windows 98, xp, vista, windows 7, with or
without server.
I don't need an better solution, only an compatible solution that
works.
run.c solves for me.
Someone who prefers clean, platform independent code,
- without dependence on MS-DOS batch files and
MS-DOS command interpreter - might find it useful
though.
To open html, xls, pdf, and another file types, I use ShellExecute()
API.
Harbour features WAPI_SHELLEXECUTE() for this, yet
in most forums people tackle custom C code to reinvent it
less cleanly.
If Harbour have RUN and HB_RUN, then I think that RUN can continue
Clipper compatible.
This is largely a platform compatibility issue, not a
Clipper one. "RUN" needs to work on all platforms
and now they work similarly on all platforms, uniformly
using Harbour's low-level Process API, behaving
the same way on all platforms and supporting the same
Harbour level features on all platforms, including
codepage translation.
Change is generating too may questions, and will generate much more
when released as oficial.
Yes, you yourself repeated it three or four times.
Also remember you're using unstable development
version of Harbour (3.2.0dev), so it may even change
before the final release (although I don't have such
plans ATM). If you have a suggestion how to solve
the codepage problem and compatibility problems
with other platforms, please make it on the devel list.
As for solutions:
RUNSHELL() is the function to call the shell as
I told you a while ago (without any reaction of
course), it's available in hbxpp.hbc. There is also
WAPI_SHELLEXECUTE() to launch documents.
There is also WIN_RUNDETACHED(), both in
hbwin.hbc, and there is portable HB_PROCESSRUN()
in core, if you need to call external process in
well controlled way. There is also HB_PROCESS*()
API for even more control. And of course you may
use HB_RUN()/RUN/!/__RUN() with the command
shell.
These have been repeated many times in Harbour
forums in last years.
-- Viktor