Page 1 of 2 12>
Topic Options
#77070 - 2003-10-10 02:09 PM Hide is hide, right?!
Ryan Offline
Fresh Scripter

Registered: 2001-11-11
Posts: 42
Loc: the Netherlands
Hello scripters,

In the following example, I see a strange console behavior.

If I start this script, with wKiX32.exe and no -i switch, the console is invisible for 4 seconds, then appears very quick and is then invisible for another 2 seconds. After that the console is visible as aspected.

But in my opinion it should not appear after 4 seconds from start. If I take away "1" ?, the console doesn't show up, but hide is hide, right?!

code:
Sleep 2
$intRC = SetConsole("Hide")
Sleep 2
"1" ?

Sleep 2
$intRC = SetConsole("Show")
Sleep 2
"2" ?

Get $

Kind regards,
Ryan

Top
#77071 - 2003-10-10 02:17 PM Re: Hide is hide, right?!
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
I guess this is by design...

running wkix without -i hides the console unless you generate console output. The "1"? does this and therefore the flashing box...

See what happens if you remove "1"?, "2"? and the $intRCs... It should flash since setconsole returns a value.
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#77072 - 2003-10-10 02:36 PM Re: Hide is hide, right?!
Ryan Offline
Fresh Scripter

Registered: 2001-11-11
Posts: 42
Loc: the Netherlands
If I start the same script with KiX32.exe, a console appears for 2 seconds, is then invisible for 4 seconds. So this is normal, it doesn't show up, after I hide the console with the function SetConsole("Hide"). And that's how it should work. Hide is hide, right?!

SetConsole("Hide") should hide the console, no mather what.
SetConsole("Show") should show the console.

Top
#77073 - 2003-10-10 02:46 PM Re: Hide is hide, right?!
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Ryan,

I was right [Razz]

From the manual:
quote:
KiXtart 2001 is provided in two ‘flavors’: the standard console-based version and a Windows version. The Windows version will only display a console if and when any output is sent to the screen. If desired, this behavior can be overridden using the /I (Invisible) commandline option.
Since the setconsole and the ""? return values, and your not using the -i, this behaviour is by design. (It has nothing to do with setconsole, but with wkix32...)
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#77074 - 2003-10-10 03:32 PM Re: Hide is hide, right?!
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11162
Loc: Boston, MA, USA
Yes, correct code behavior and fully documented in the KiXtart Manual.
_________________________
There are two types of vessels, submarines and targets.

Top
#77075 - 2003-10-11 10:27 AM Re: Hide is hide, right?!
Ryan Offline
Fresh Scripter

Registered: 2001-11-11
Posts: 42
Loc: the Netherlands
Yes I know what the manual says. I have it hanging above my bed. [Wink]

But what should SetConsole("Hide") do in your opinion?

Please, also try the code before you place your theories. Try it with both KiX32 and wKiX32, without -i.

Top
#77076 - 2003-10-11 03:43 PM Re: Hide is hide, right?!
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22343
Loc: OK
yep.
boys boys.

Ryan,
indeed, when you use setconsole in wkix32, you are creating the console.
the console is not even there in wkix32 unless you use it.
with setconsole, you tell kixtart to do something with it, thus it does create it, then looks what it should do with it.
in this case hide.
thus you are creating the console to hide it.

your comment about:
"1" ?
I don't get.
it does not affect at all as the console is shown and once before.
_________________________
!

download KiXnet

Top
#77077 - 2003-10-11 04:01 PM Re: Hide is hide, right?!
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Jooel is right. You create the console by trying to hide it. Better to simply not create the console at all. Then you will not have to hide it.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#77078 - 2003-10-11 11:08 PM Re: Hide is hide, right?!
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Like I said...

Setconsole returns a value which is displayed when using wkix32 without -i...
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#77079 - 2003-10-11 11:20 PM Re: Hide is hide, right?!
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Patty,
I beg to differ... SetConsole() does return a value, but the value is handled. WKiX simply creates the console before hiding it. I find this to be an annoyance and think that for WKiX the default for the console should be hidden and should have to be explicitly set to show it.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#77080 - 2003-10-11 11:33 PM Re: Hide is hide, right?!
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
It should, but it doesn't. So... Let's stop 'fighting', we're both right!
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#77081 - 2003-10-12 12:56 AM Re: Hide is hide, right?!
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22343
Loc: OK
sorry pat, you wrong.
he handled the return value.
it does not matter does it return something or not.
simple call for setconsole will always create console to be able to hide it.
_________________________
!

download KiXnet

Top
#77082 - 2003-10-12 12:59 AM Re: Hide is hide, right?!
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
yeah Patty... you're wrong. [Frown]
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#77083 - 2003-10-12 11:44 PM Re: Hide is hide, right?!
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
I know,

but I hate it when I'm wrong (or loose)...
[Mad] [Mad] [Mad] [Mad] [Mad]
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#77084 - 2003-10-13 12:28 AM Re: Hide is hide, right?!
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22343
Loc: OK
hehee.
don't worry pat, I still love you even though you not perfect bastmorta! [Wink]
_________________________
!

download KiXnet

Top
#77085 - 2003-10-13 07:41 AM Re: Hide is hide, right?!
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Seen that BASTA thingie around lately...

What did I miss???
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#77086 - 2003-10-13 11:31 AM Re: Hide is hide, right?!
Ryan Offline
Fresh Scripter

Registered: 2001-11-11
Posts: 42
Loc: the Netherlands
Hi,

Thanx for your comment!

Lonkero I know it's just a stupid sample script, just playing around.

Since the -i switch came i've registered .KiX to open with wKiX32.exe and that switch. Sometimes I want a console. So I've more enteries on that registry key. But i want to control it in the script, console or consoleless.

But I've found out what creates the unwanted console in my wanted consoleless scripts. If i start writing a script, i copy all the SetConsole and SetOption options from a default script template. And it's the SetOption("WrapAtEOL", "ON"), that creates a console just there in a blink of an eye. Solution: take it out there! it's not needed in a consoleless script.

Sample:
code:
$intRC	= SetConsole("Hide")
Sleep 1
$intRC = SetOption("WrapAtEOL", "ON")
Sleep 1
Get $

Groetjes Ryan

Top
#77087 - 2003-10-13 02:17 PM Re: Hide is hide, right?!
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22343
Loc: OK
you mean your setconsole("hide") does not do it?
if not, could you tell me your kix-version as in all versions that makes the console.
_________________________
!

download KiXnet

Top
#77088 - 2003-10-13 04:20 PM Re: Hide is hide, right?!
Ryan Offline
Fresh Scripter

Registered: 2001-11-11
Posts: 42
Loc: the Netherlands
Hi Lonkero,

Both 4.22 Release Candidate 1 and 4.21. W2K Pro UK, SP4.

In the sample from this morning, the console is hidden for 1 second. And then popups and disappears very quick, at the SetOption("WrapAtEOL", "ON") function. I mean the console doesn't stay there, I can see it flashing and that's what i find strange. But it's NOT on the SetConsole("Hide") function.

Do you experience something different? Play around with the code, make the 2 Sleep's 3 seconds, or leave a line out of it.

Please don't tell me it's only me! [Big Grin]

Top
#77089 - 2003-10-13 05:32 PM Re: Hide is hide, right?!
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22343
Loc: OK
actually, it seems that setconsole does not anymore create the console. if it has ever done it.
sleep 5 ;wait for kix to start fully 
$=setconsole("hide") ;get the flash
"some output to verify the console is really hidden"
sleep 2
_________________________
!

download KiXnet

Top
Page 1 of 2 12>


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

Who's Online
0 registered and 152 anonymous users online.
Newest Members
dimi575, Drecksnacken, Nlill, webtools321, multiman
17734 Registered Users

Generated in 0.062 seconds in which 0.032 seconds were spent on a total of 13 queries. Zlib compression enabled.

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