|
rob Novice
Joined: 12 Oct 2000 Posts: 30 Location: Australia
|
Posted: 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
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
|
rob Novice
Joined: 12 Oct 2000 Posts: 30 Location: Australia
|
Posted: 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. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
|
rob Novice
Joined: 12 Oct 2000 Posts: 30 Location: Australia
|
Posted: 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. |
|
|
|
|
|