Page 1 of 1 1
Topic Options
#91080 - 2003-01-16 09:51 PM Shawn - Capture Console Output in KixForms?
Crazy Eddie Offline
Starting to like KiXtart

Registered: 2002-11-20
Posts: 105
Loc: Sacramento, CA USA
Shawn,

Amazing work you are doing lately...!

Question - have you considered, and/or is it possible to have a Kixforms wrapper around a regular login script, with an object that could display the standard console output?

Concept: Most users would rather not see the script messages, and putting up a KixForm with an interesting picture, etc. would be more to their liking. However, us geeks would like a toggle to see the results. It could be expanded to include a pushbutton to show the full console size (within KixForms), or possible buttons to launch a HelpDesk Info script.

Is this remotely possible? Or interesting?

-Ed
_________________________
{Insert your favorite Witty Tag Line here}

Top
#91081 - 2003-01-16 10:07 PM Re: Shawn - Capture Console Output in KixForms?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Use e.g. REDIRECTOUTPUT() or the WriteLog() or DisplayText() UDFs to write a log file for logins.
_________________________
There are two types of vessels, submarines and targets.

Top
#91082 - 2003-01-16 10:09 PM Re: Shawn - Capture Console Output in KixForms?
Crazy Eddie Offline
Starting to like KiXtart

Registered: 2002-11-20
Posts: 105
Loc: Sacramento, CA USA
I'm using all those features inside the script. What I am thinking in more of an in-line console in kixforms that can show the output in realtime.

Maybe pie-in-the-sky...but I thought I'd ask.

(Similar to VB apps that embed a browser. That kind of thing...)

-Eddie
_________________________
{Insert your favorite Witty Tag Line here}

Top
#91083 - 2003-01-16 10:16 PM Re: Shawn - Capture Console Output in KixForms?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Welll you could do the same... use IE via COM, but I don't think people actually read any of the crap anyway. Been there, tried that, nobody reads.

They type in the password and then go pour a coffee.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#91084 - 2003-01-16 11:49 PM Re: Shawn - Capture Console Output in KixForms?
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Eddie -

Think I know exactly what your talking about and I have even researched this. In fact, even before kixforms was born, this idea of yours was the very first one i tried.

Correct me if im wrong, but what your suggesting is to "wrap" the kixscript in a virtual DOS console - instead of that bland old (real) DOS console. And to the script itself, it would be totally transparent. And when the script writes to the console using ?'s and ""'s - the output would go to the fancy GUI console (wrapper) instead of the real one. And maybe on "the side" of this console you could have special buttons that did neat things.

Believe me when I say that all this is possible, in fact its almost an ideal way to work this whole GUI script thing. There are even some freeware utilities available on the net that can do this. But heres the big problem - these wrappers only work with programs that read and write their output to stdout and stdin. In other words - well behaved DOS utilities. They work by intercepting or hooking-into the input and output streams.

Unfortunately (and I know this for a fact) Kixtart does NOT use these standard mechanisms. Kixtart writes directly to the DOS console using the Windows Console API's. That this is how it is able to support all those fancy cursor positioning (AT) and COLOR commands. It's also evidenced by the fact that Kixtart cant handle (support) redirection or stdin and stdout on the command line.

I've even gone so far as to try running Kixtart under one of these wrappers but with absolutely zero luck [Frown] Great suggestion though and maybe someone else on the board has heard of something that may work with Kixtart.

[ 16. January 2003, 23:53: Message edited by: Shawn ]

Top
#91085 - 2003-01-17 12:13 AM Re: Shawn - Capture Console Output in KixForms?
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
Shawn,

One challenge more!

You would also need some way of capturing StdErr in your wrapper.

Messages from ie. the Net command are reported via stderr to the console. Even sucess messages [Roll Eyes]

-Erik

Top
#91086 - 2003-01-17 01:58 AM Re: Shawn - Capture Console Output in KixForms?
Crazy Eddie Offline
Starting to like KiXtart

Registered: 2002-11-20
Posts: 105
Loc: Sacramento, CA USA
Shawn - You nailed my request on the head. I was hoping that Wkix32.exe would do something like this (before I actually read the docs or ran the exe.)

Perhaps another way to say it...I wish that CMD.EXE was a COM object!



At least I'm not too crazy for thinking about it.

-Eddie
_________________________
{Insert your favorite Witty Tag Line here}

Top
#91087 - 2003-01-17 02:13 AM Re: Shawn - Capture Console Output in KixForms?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I still don't understand what ppl fancy about that console...
it's old dos thing and there is nothing to see.
_________________________
!

download KiXnet

Top
#91088 - 2003-01-17 02:18 AM Re: Shawn - Capture Console Output in KixForms?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Back in the DOS days I used to put up messages at logon but nobody would read them. I graduated to using a proggy where you had to scroll down to the bottom to dismiss it but they still wouldn't read it. Guess what! Today it's GUI-fied and they still don't read it!

All the phonecalls to the HelpDesk are testament to that.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#91089 - 2003-01-17 02:40 AM Re: Shawn - Capture Console Output in KixForms?
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Guys,

Heres an example of a console wrapper that implements stdout redirection - sadly it also demonstrates that Kixtart isn't a very good candidate for this - but it does work with most other DOS utilities:

Console Output Redirection Demo (Wrapper)

No I didn't write this.

To use it - start the demo then in the command box type:

cmd /c dir *.*

then ENTER ... should see the results. Then try this command:

kix32 /?

should see that kix32 writes its usage using stdout ? ... then might try running a script that performs some output ...

kix32 c:\test.kix

curious to see if anyone gets any output generated with this ...

-Shawn

Top
#91090 - 2003-01-17 02:45 AM Re: Shawn - Capture Console Output in KixForms?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Sorry ... no work well with KiX.

I got nothing to come back.

Top
#91091 - 2003-01-17 02:47 AM Re: Shawn - Capture Console Output in KixForms?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Ask Ruud for a redirect option in the next ver.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#91092 - 2003-01-17 02:49 AM Re: Shawn - Capture Console Output in KixForms?
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
please don't! [Frown]

this is a time for GUI not dos 3.41!
_________________________
!

download KiXnet

Top
#91093 - 2003-03-31 05:31 PM Re: Shawn - Capture Console Output in KixForms?
jtokach Offline
Seasoned Scripter
*****

Registered: 2001-11-15
Posts: 513
Loc: PA, USA
No please do! Redirection to stdout would help greatly. Particularly, the editor that I use has the ability to capture console output whether it's from a compiler or in Kix's case, an interpreter. Unfortunately, it can't capture any kix output b/c it's not redirecting to stdout...

[ 21. April 2003, 19:21: Message edited by: jtokach ]
_________________________
-Jim

...the sort of general malaise that only the genius possess and the insane lament.

Top
#91094 - 2003-04-08 01:00 PM Re: Shawn - Capture Console Output in KixForms?
Will Hetrick Offline
Hey THIS is FUN

Registered: 2001-10-02
Posts: 320
Loc: Harrisburg, PA USA
Too bad we just can't use redirectoutput("stdout")
_________________________
You have at least 2 choices. Each choice changes your destiny. Choose wisely!

Top
#91095 - 2003-04-08 02:24 PM Re: Shawn - Capture Console Output in KixForms?
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Hmm. I have a kludge which will allow you to get close, but it is not very pretty.

I knocked up a console screen dump utility a little while ago. If the output from the commands are short enough, you can go through a process of:
1) Clear screen
2) Run command
3) Dump screen
4) Display in GUI

The screen dump utility copies the information directly from the console, so redirection isn't a problem, however you do need a console [Wink]

Top
#91096 - 2003-04-21 07:23 PM Re: Shawn - Capture Console Output in KixForms?
jtokach Offline
Seasoned Scripter
*****

Registered: 2001-11-15
Posts: 513
Loc: PA, USA
Why not just use wshPipe() ?

It works great... In most cases.

[ 21. April 2003, 19:23: Message edited by: jtokach ]
_________________________
-Jim

...the sort of general malaise that only the genius possess and the insane lament.

Top
#91097 - 2003-04-24 01:19 PM Re: Shawn - Capture Console Output in KixForms?
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
The problem is that the output is written directly to the console "device", so that it cannot be piped or redirected.

This is why the kludge suggested dumps the console content to a file.

Top
Page 1 of 1 1


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

Who's Online
0 registered and 987 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.166 seconds in which 0.09 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