Page 1 of 1 1
Topic Options
#128198 - 2004-10-20 10:37 PM wkix32 console, not what expected.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
doing a settitle() on wkix32 without output says error=6

this is more of an design flaw than bug.
when you output something to wkix32 console, it gets created and settitle() works.

same goes for things like setconsole("hidden")

going further...
doing a spawn:
run "wkix32 somescript.kix"

and outputting from somescript, well, it outputs to window.
but using multiple spawns, all of them output to SAME window!

suggestion of changes...
making the console the way expected, either make more control to the console.
make the console an "object" that can be controlled as any com-object.
or make the console work as wsh shelll does, open each console in it's own window.
_________________________
!

download KiXnet

Top
#128199 - 2004-10-21 10:43 AM Re: wkix32 console, not what expected.
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Quote:

doing a settitle() on wkix32 without output says error=6

this is more of an design flaw than bug.
when you output something to wkix32 console, it gets created and settitle() works.

same goes for things like setconsole("hidden")




I disagree that it's a design flaw, it's what you would expect to happen. If the console does not exist, then attempting to manage it is going to cause an error.

It would be like trying to write to a file that has not been opened.

It's actually a neat way to determine if there is a console.

The process of automatically creating a console when there is output queued is presumably because there is no explicit "CreateConsole()".

Quote:

going further...
doing a spawn:
run "wkix32 somescript.kix"

and outputting from somescript, well, it outputs to window.
but using multiple spawns, all of them output to SAME window!




That's not surprising considering KiXtart's pedigree. The console is associated with the process, and there is (normally) only one. The console is inherited by any child process that is started so output will appear on the same one.

Quote:

suggestion of changes...
making the console the way expected, either make more control to the console.
make the console an "object" that can be controlled as any com-object.
or make the console work as wsh shelll does, open each console in it's own window.




Why re-invent the wheel
Code:
$objShell=CreateObject("Wscript.Shell")

$=$objShell.Run("%COMSPEC% /C DIR && pause")
$=$objShell.Run("%COMSPEC% /C DIR && pause")
$=$objShell.Run("%COMSPEC% /C DIR && pause")
$=$objShell.Run("%COMSPEC% /C DIR && pause")


Top
#128200 - 2004-10-21 10:50 AM Re: wkix32 console, not what expected.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
richie...
re-inventing this is not.
but indeed wsh-shell inside kixomatic made me remember this old topic...

so, what is the output here is that wkix32.exe shouldn't be used for multiprocess environments where console output is needed.
k.

the suggestion part then...
give us more control over the console.
the current way, for shell example, being command and all, no good.
but lets say, if it would be function:
shellEx(PROGRAM TO RUN, ARGUMENTS, RUN ALONE SWITCH (detach), VISIBILITY SWITCH)

or alike.
quess I need to start a new thread.
too many things combined under this one.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Lonkero, ShaneEP, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 200 anonymous users online.
Newest Members
Kelly001, MichaelK72, Janneman, standardbruker, maikoenig2001
17773 Registered Users

Generated in 0.029 seconds in which 0.012 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org