Page 1 of 1 1
Topic Options
#154761 - 2006-01-08 08:18 PM Getting rid of screen output
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Okay I understand that having a bunch of 0 returning to the console window is bad, and I have removed most of them from the code that I am working on, but have some that are giving me problems.

Here is the code
Code:
$t = 750
$l = 0
For $a=1 to 100 step 20
$t = $t -75
$l = 0
For $forward = $a to $a+10 step 1
$nul = Execute("$Panel"+$forward+" = $System.Panel()")
$nul = Execute("$Panel"+$forward+".BorderStyle = 1")
$nul = Execute("$Panel"+$forward+".Left = "+$l)
$nul = Execute("$Panel"+$forward+".Top = "+$t)
$nul = Execute("$Panel"+$forward+".Width = 100")
$nul = Execute("$Panel"+$forward+".Height = 75")
$nul = Execute("$Panel"+$forward+".BackColor = $System.Color.Transparent")
$nul = Execute("$nul = $Form1.Controls.Add($Panel"+$forward+")")
$l = $l + 100
Next
$t = $t -75
$l = 0
For $backward= $a+19 to $a+10 step -1
$nul = Execute("$Panel"+$backward+" = $System.Panel()")
$nul = Execute("$Panel"+$backward+".BorderStyle = 1")
$nul = Execute("$Panel"+$backward+".Left = "+$l)
$nul = Execute("$Panel"+$backward+".Top = "+$t)
$nul = Execute("$Panel"+$backward+".Width = 100")
$nul = Execute("$Panel"+$backward+".Height = 75")
$nul = Execute("$Panel"+$backward+".BackColor = $System.Color.Transparent")
$nul = Execute("$nul = $Form1.Controls.Add($Panel"+$backward+")")
$l = $l + 100
Next
Next



As you can see with the Executes I am making sure that I am supressing the return codes with the use of $Nul.
Through debugging I have found the problem is the For statement is also returning a 0 to the console.
I know that I can't just put $Nul = For ... as this creates an error in expression.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#154762 - 2006-01-08 08:27 PM Re: Getting rid of screen output
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Do you have NoVarsInString turned on or off ?
Top
#154763 - 2006-01-08 10:18 PM Re: Getting rid of screen output
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
$nul = SetOption("NoVarsInStrings", "ON")
$nul = SetOption("WrapAtEOL", "ON")
_________________________
Today is the tomorrow you worried about yesterday.

Top
#154764 - 2006-01-08 10:54 PM Re: Getting rid of screen output
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Im not seeing any return codes with this snippet of code ... could it be coming from some other part of your code ?
Top
#154765 - 2006-01-08 11:03 PM Re: Getting rid of screen output
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
hmm, In the testing that I was doing it would return a 0 after the For $forward = ... and the For $Backwards = ....

This is part of the code that is posted at KFORG. Should I look in the form code that is called from the main script, or the main script itself.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#154766 - 2006-01-09 12:54 AM Re: Getting rid of screen output
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
add a debug comment line right before and after the loops.
like:
"entering the forward loop" ?
...
"leaved the forward loop" ?

with such lines, you can find out the exact section and line that does output stuff.
you on Gtalk?
_________________________
!

download KiXnet

Top
#154767 - 2006-01-09 02:00 AM Re: Getting rid of screen output
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Please delete this thread.... I don't know what changed, but now there are no more 0 in the console window.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#154768 - 2006-01-09 02:07 AM Re: Getting rid of screen output
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
forgot the CTRL+S?

well, stuff happens, the most important thing is, you got rid of those
_________________________
!

download KiXnet

Top
Page 1 of 1 1


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

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.073 seconds in which 0.039 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