Hello, everyone!
I'm searching a script to display a text in a popup window with different from dc settings font.
My text style in my DC settings is "Microsoft Sans Serif".
I wanted text on command !text be displayed with "Courier New". This is a code of my text file.
botname = "Joker"
text = "txt/text.txt"
function DataArrival(user, data)
if( strsub(data, 1, 1) == "<" ) or (strsub(data, 1, 4) == "$To:") then
s,e,cmd = strfind( data, "%b<>%s+(%S+)%s*")
cmd=strsub(cmd,1,strlen(cmd)-1)
if (cmd=="!text") then
readfrom(text, "r")
local message = ""
while 1 do
local line = read()
if (line == nil) then break else
message = message..line.."\r\n"
end
end
user:SendPM(botname,message)
end
end
end
I wanted this textfile be shown with "Courier New" font in a popup window.
I know that it is possible... I saw that somewhere on public hubs. But I don't remember where exactly...
Who can help me with this script? It's very important to show that file with "Courier New" font. :-)
Can somebody help me please? :(
hi m8 ...
you cant change the font setting of other clients..
maby in scripted clients it could be possible..
Hi!
I wanted to create a table. But if the font is Microsoft Sans Serif or something like it the table looks very bad. It looks moved and broken, though it looked perfect in my txt editir.
In a popup window it looked like it looks now:
+---------------+---------------+---------------+
| | | |
| 1111 | 6666 | 7777 |
+---------------+---------------+---------------+
| | | |
| 2222 | 5555 | 8888 |
+---------------+---------------+---------------+
| | | |
| 3333 | 4444 | 9999 |
+---------------+---------------+---------------+
I need to change and update a table everyday. And I need only table. How can I make It look good without changing my dc++ textstyle font (All the users on my hub use Microsoft Sans Serif by default and they are not going to change their fonts).
who can help me?
hi m8
Redo your text file using Microsoft Sans Serif.
Sorry Mutor
Got to ask this!
How will the [/T] help me?
QuoteOriginally posted by BoJlk
Sorry Mutor
Got to ask this!
How will the [/T] help me?
uhm .. it is not " /T " it is a " \t " that is the vertical Tab ... it is the same as pressing the key labeled "Tab" on the left side your keyboard ... you can try this in a script ..
SendToAll(" ok let's try ...\t doesnt this look a bit moved to the side ?\r\n... no? \t\t\t\t\t\t\t\t\tthen this ???")
If you see the " \r\n " and try this line in a script then you'll find out that it is like pressing "Enter" in a text editor .. :)
Okey Herodes
So correct me if i'm wrong
[\t] = TAB
[\r\n] = Enter
is there more commands like this?
grab the lua4 manual from here. (http://rnrdoctor.sytes.net/luabook1.pdf)
Heeey!, Thanks...bastya_elvtars