Make your own free website on Tripod.com
 
[ Neo-Forumz ]

   [ Neo-Talk

Author Comment
marlo
Unregistered User
(4/19/00 9:18:26 am)
Reply
How can i generate this "|" character on NBK?
Hi all. I need to generate | character on NBK

How is the code for this? I see that [ is [#91] and
so on ( on the NBK help file) but nothing about
|

|?

thanks

marlo

Jim Brammer
Administrator
(4/19/00 4:32:17 pm)
Reply
Re: How can i generate this "|" character on NBK?
Marlo, the ASCII # for the pipe symbol is 124...

| = [#124] 

Jim Brammer * jnlbrmr@freewwweb.com * http://neodezign.tripod.com/

marlo
Unregistered User
(4/20/00 10:14:45 am)
Reply
Txs Jim, but don't work!
Thanks Jim for the info, but if a make

a FileWrite command with some text and [#124]
inside it , and then in the text generated by NBK 
appears blank lines above , and dont appear the
"|" lines.

Marlo
 
 

NEILOZ
Global user
(4/20/00 11:47:39 am)
Reply
Re: i get them like this
this is probably not what you want but remember its just a thought

i am currently toying with a project that also needs thes lines

i probably go the long way around but i get the result i want

the | charecter shows up as many times as you want it
and spaced where ever you want it

i do this by creating a text file

the command i use is to FileWrite "MyText.dat" "1" "Text"
I create a "Var" called "Text"

and use the text entry feature of the button
the button is MultiLine

So now when i type for example
in the text button

One
Two
three
four

Then the file wrie feature takes hold
When i read the file
it comes out like this
One|Two|three|four|

then using the SubString command
I think you know what to do next
As i remember you helped me with this command once

so maybe you could use this like this to make it easier
A
A
A
A
then get 

A|A|A|A
substring set to one space permantly

Ok
i hope this helps or maybe you can simplify it 
Thank You friend
Neol Oz

Jim Brammer
Administrator
(4/20/00 4:20:16 pm)
Reply
Re: How can i generate this "|" character on NBK?
Works fine for me? Try this...

FileWrite "c:\windows\desktop\text file.txt" "1" "This is some text [#124] This is more text | And this is even more text"

Put that in a button and see what you get. For me, both the [#124] and the | write to the text file. What is it you are trying to do with the pipe character? How are you trying to write it?
 

Jim Brammer * jnlbrmr@freewwweb.com * http://neodezign.tripod.com/

marlo
Unregistered User
(4/21/00 5:32:46 am)
Reply
About |...
Well, i try to set var with javascript text that include the blessed || on it. and then the var

is a content of a text entry box. If I you try to
put SetVar "[body]" "xxxxxx xxxxxx||xxxxxxx" the
var content for NBK is "xxxxxx xxxxxx

xxxxxxxx"
as appear on entry box.And I try "xxxxx[#124][#124]xxxx" and i get the same result on text entry button box.

marlo

Jim Brammer
Administrator
(4/21/00 6:41:50 am)
Reply
Re: About |...
Oh, I see. Yes, the text entry box will do that. It looks at the pipe character "|" as a Carriage Return/Line Feed indicator. When a "|" is encountered in a text entry box it displays the string just like you described...

Line:
xxxxxx xxxxxx||xxxxxxx

Text Entry:
xxxxxx xxxxxx

xxxxxxx

If you need to see the variable as one continuous line you might use a String Replace routine (example in the PUBz area) on that variable to replace the pipe character with a different character...

SetVar "[source]" "xxxxxx xxxxxx||xxxxxxx"
SetVar "[find]" "|"
SetVar "[replace]" ":"

SearchStr "[find]" "[source]" "[Pos]"
While "[Pos]" ">" "0"
SearchStr "[find]" "[source]" "[Pos]"
StrDel "[source]" "[Pos]" "1" "[source]"
If "[Pos]" ">" "0"
StrIns "[replace]" "[source]" "[Pos]" "[source]"
EndIf
EndWhile
 

The result will look like this...

Line:
xxxxxx xxxxxx::xxxxxxx

Now the string will display in a single line in a text entry box. If you need to put the pipe character back again just do the same routine in reverse...

SetVar "[source]" "xxxxxx xxxxxx::xxxxxxx"
SetVar "[find]" ":"
SetVar "[replace]" "|"
- - (same loop) - -

I asked Dave @ NeoSoft about a "StringReplace" command in the next version of NeoBook and he seemed to like it and thought it should not be a problem to add it. That way we won't have to use While loops to do replacements! =)

Marlo, I hope this helps. Let me know if this works for you or not...

Jim Brammer * jnlbrmr@freewwweb.com * http://neodezign.tripod.com/


 
Jump to: 

- Neo-Forumz - Neo-Talk - Back to NeoDezign -