Page 2 of 6 <12345>Last »
Topic Options
#90491 - 2002-12-11 10:27 AM Re: PostPrep-Test Post , please ignore code
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Here is the same thing converted by Rogiers PostPrep :


setascii("on")
$a = 1
cls
while $a < 5 ;Change this value to get more or less numbers
   $y = 1
      while $y <= 80
         $z = 1
         while $z <= 20
            at($z,$y) "$x " + chr($x)
            $z = $z + 1
            $x = $x + 1
         loop
         $y = $y + 10
      loop
   ? shell "%comspec% /c pause"
   $a = $a + 1
loop
exit



will try to ammend mine as needed
_________________________



Top
#90492 - 2002-12-11 10:37 AM Re: PostPrep-Test Post , please ignore code
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Errrrggg ... got rid of the 'br' tag completely !
Much better now [Big Grin]
Thanx Richard for pointing me to this

[ 11. December 2002, 10:37: Message edited by: jpols ]
_________________________



Top
#90493 - 2002-12-11 10:40 AM Re: PostPrep-Test Post , please ignore code
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Are you passing carriage returns and/or line feeds in the posted data?

If so, try removing them. The submit process may be converting them to breaks, and if you include a break yourself you may end up with two per line.

Top
#90494 - 2002-12-11 10:48 AM Re: PostPrep-Test Post , please ignore code
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Yeah ,

thats why it did this [Roll Eyes]

Lookie above (Post #17)

hmmm ... ok, no breaks at all if saved as html in my proggie now ... have to revamp [Frown]

[ 11. December 2002, 12:21: Message edited by: jpols ]
_________________________



Top
#90495 - 2002-12-12 12:55 AM Re: PostPrep-Test Post , please ignore code
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Ok, got the save as html business doen with split/join [Wink]

There is a question left though :

How can prevent breaking of long lines ?

Maybe an addition to first span style tag ? But which ?

Richard ? Joeel ? Anyone ?
_________________________



Top
#90496 - 2002-12-12 12:57 AM Re: PostPrep-Test Post , please ignore code
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
wait a sec.

also you should still skip those spans [Razz]
_________________________
!

download KiXnet

Top
#90497 - 2002-12-11 01:16 PM Re: PostPrep-Test Post , please ignore code
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
I have ot rid of 'em too ... working also (ok the whitespaces are a bit puzzled by that , but sure they will get back in line with some research)

Thanx!
_________________________



Top
#90498 - 2002-12-11 01:33 PM Re: PostPrep-Test Post , please ignore code
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so what is the part that does work in spacing?
I thought you didn't want no-wrap but you neither want wrap [Eek!]

cold you help me on this?
_________________________
!

download KiXnet

Top
#90499 - 2002-12-11 01:39 PM Re: PostPrep-Test Post , please ignore code
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
You should be able to simply wrap the whole thing in <NOBR> </NOBR> elements.

NOBR==No Break.

R.

Top
#90500 - 2002-12-11 01:47 PM Re: PostPrep-Test Post , please ignore code
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Haha ,

forget the spacing ... I took your advice and replaced only every second WhiteSpace by nbsp !
That works just fine , plus all 'span style' tags for color are replaced by 'font color' [Smile]

My final Issue now is to prevent it from wrapping long lines, as this reduces the readability

J.
_________________________



Top
#90501 - 2002-12-11 02:01 PM Re: PostPrep-Test Post , please ignore code
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
sorry.
if it does not wrap, it will also reduce readability.
_________________________
!

download KiXnet

Top
#90502 - 2002-12-11 02:26 PM Re: PostPrep-Test Post , please ignore code
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
disagreed ...

if one code in his favorite editor one would also disable Word-Wrap , no ?
_________________________



Top
#90503 - 2002-12-11 02:35 PM Re: PostPrep-Test Post , please ignore code
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ok, I'll give you an example.
this is the code for, you know without word-wrap
say how readable your posts are after this:

function existonpath($_file)
dim $
for each $ in split(readvalue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment","path")+";"+readvalue("HKEY_CURRENT_USER\Environment","path"),";") if exist($+"\"+$_file) $existonpath=not 0 endif next
endfunction

same but little smaller:

function existonpath($_file)
dim $
for each $ in split(readvalue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment","path")+";"+readvalue("HKEY_CURRENT_USER\Environment","path"),";") if exist($+"\"+$_file) $existonpath=not 0 endif next
endfunction


{edit}
forgot the font tags...

[ 11. December 2002, 14:44: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#90504 - 2002-12-11 02:39 PM Re: PostPrep-Test Post , please ignore code
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Yeah,

but that relies on the author of the code !
If one prefers to write one-liners or doesn't indent his code I can't help [Roll Eyes] [Razz]

I will try it with 'nobr' tags , thanx !
_________________________



Top
#90505 - 2002-12-11 02:43 PM Re: PostPrep-Test Post , please ignore code
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
what about option for wrap?
or font resizer.
check my above post again, added the same below the first with little smaller font.
_________________________
!

download KiXnet

Top
#90506 - 2002-12-11 02:46 PM Re: PostPrep-Test Post , please ignore code
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Yeah !

That will be definetly in the final Beta release ..

But for now as Shawn said this morning 'concentrate on the important, add bells and whistles later' [Big Grin]
_________________________



Top
#90507 - 2002-12-18 06:06 PM Re: PostPrep-Test Post , please ignore code
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Here is a last update before I leave for my X-mas Vacation [Big Grin]

(below a sample code of BoxKite, converted in 1 second (too slow !) without recognising Operators yet, but it's going the right direction)



setascii("on")
$a = 1
cls
while $a < 5 ;Change this value to get more or less numbers
   $y = 1
       while $y <= 80
          $z = 1
          while $z <= 20
              at($z,$y) "$x " + chr($x)
              $z = $z + 1
              $x = $x + 1
          loop
          $y = $y + 10
       loop
   ? shell "%comspec% /c pause"
   $a = $a + 1
loop
exit




See you next year !
_________________________



Top
#90508 - 2002-12-18 06:09 PM Re: PostPrep-Test Post , please ignore code
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Whoa, whoa Captain ...

1) Wheres the code ?

2) Where you going ? Sailing the boat to Siberia or something ? You not going to be around the board ?

-Shawn

Top
#90509 - 2002-12-18 06:18 PM Re: PostPrep-Test Post , please ignore code
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
j, yes, where is updated code?
especially the parser/translator part...

me want to see.
_________________________
!

download KiXnet

Top
#90510 - 2002-12-18 08:48 PM Re: PostPrep-Test Post , please ignore code
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Well well well my friends,

You want to see the Code ? It's (still) Alpha code which I am not very proud of !

The story of the last days :

Shawn gave me the tip not to take the Output Textbox as buffer but a string variable ... That cut down the conversion time for the 600 lines (only strings and comments highlighted) from somewhat over 5 minutes down to 35 seconds [Eek!]
(You never know how darn slow that COM business can be)

Then while pushing the code forward to convert also Commands, Functions, Macros (Operators left to do, plus double occurances of Keyword per line not handled) I decided to take an Array of strings as buffer, which increases performance once again (converted 650 lines in 12 seconds)

Now the actual code has got this ability but (by implementing commands, macros, functions) it slowed down to convert itself (821 lines) in 1 minute 20 seconds [Frown]

I am not happy with it (especially that it needs 128 kb when saved as html file !)

Will spend some time at my In-Laws untill after 26th.

Hopefully I have some time afterwards for rebuilding the Conversion algorithm(or should I say 'routine' [Wink] )

If you want the code, just send me an email, I'll see If I find the reply button

J.

[ 18. December 2002, 20:49: Message edited by: jpols ]
_________________________



Top
Page 2 of 6 <12345>Last »


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

Who's Online
0 registered and 557 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.073 seconds in which 0.024 seconds were spent on a total of 14 queries. Zlib compression enabled.

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