Fonts...
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Fonts...

Started by NemeziS, 19 September, 2004, 15:12:22

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

NemeziS

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. :-)
--LUA forever! =)

NemeziS

Can somebody help me please? :(
--LUA forever! =)

??????Hawk??????

hi m8  ...  

you cant change the font setting of other clients..

maby in scripted clients it could be possible..

NemeziS

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?
--LUA forever! =)

??????Hawk??????

hi m8  


Redo your text file using  Microsoft Sans Serif.

BoJlk

Sorry Mutor

Got to ask this!

How will the [/T] help me?

Herodes

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 .. :)

BoJlk

Okey Herodes

So correct me if i'm wrong

[\t] = TAB
[\r\n] = Enter

is there more commands like this?

bastya_elvtars

grab the lua4 manual from here.
Everything could have been anything else and it would have just as much meaning.

BoJlk

Heeey!, Thanks...bastya_elvtars

SMF spam blocked by CleanTalk