Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
rob
Novice


Joined: 12 Oct 2000
Posts: 30
Location: Australia

PostPosted: Tue Aug 11, 2015 5:02 pm   

Logging in html
 
Hi i have log in ansi colours and html ticked in prefs and am creating the html file fine with the #LOG command. I play with black background and grey text plus all the colour triggers. But when i open the html file in a browser it has a white background. If i open up the log in the editor and save it as a html file it fixes it so the background is black. Is there any way to fix this with a trigger or writing to the file or anything? Its a bit annoying having to do this to every log thats all cheers
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Wed Aug 12, 2015 5:15 am   
 
I'm not sure if this can be done without third party software, as you are currently doing.
Or without using a separate coding language from zScript.

Are you specifying the file extension in your #LOG command?
_________________
Discord: Shalimarwildcat
Reply with quote
rob
Novice


Joined: 12 Oct 2000
Posts: 30
Location: Australia

PostPosted: Wed Aug 12, 2015 8:58 am   
 
Hi yes i am putting the .html extension on. I'm then opening the log in the cmud editor and background is white. Everything else is ok. You save over the file in the editor then reopen it anywhere and background is correctly fixed as black.

I was hoping i could write something to the log html code or something to prevent having to use the editor each time.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Wed Aug 12, 2015 9:28 am   
 
Have you tried using the #FILE commands and whatnot to have CMUD read the file, and resave it?
Maybe that would trick it.
_________________
Discord: Shalimarwildcat
Reply with quote
rob
Novice


Joined: 12 Oct 2000
Posts: 30
Location: Australia

PostPosted: Wed Aug 12, 2015 5:00 pm   
 
For others I have managed to fix this by adding this code to my trigger that opens my log ...

#FILE 1 "C:\Program Files (x86)\CMUD\Character\$Logs\"@CURRENT-%time(mm)%time(mmmmmmmm-dd-yyyy)".html"
#WRI 1 "<html><head><title></title>"
#WRI 1 "</head>"
#WRI 1 "<body bgcolor="#000000" leftmargin=2 topmargin=0 rightmargin=2 bottommargin=2>"
#WRI 1 "<font size=2 color="#d3d3d3" face="Courier New">"
#CLOSE 1
#LOG "C:\Program Files (x86)\CMUD\Character\$Logs\"@CURRENT-%time(mm)%time(mmmmmmmm-dd-yyyy)".html"

So I open a file to write to as file 1 which is the same file as the days log file. I write the html code to the top of the file which sets up the file with the correct black background, font etc. Then close the file off before beginning to Log as usual.

Works a charm and if you reconnect later it still logs correctly.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net