Welcome Guest ( Log In | Register )

[ Big| Medium| Small] -



Post new topic Reply to topic  [ 7 posts ] 
    gerrtunk
  Tue Jan 25, 2011 12:30 am
Member

RGSS HTML Docuement
Version:1
By: gerkrt/gerrtunk

Introduction


This object represents a html page in memory. You can open it, write, format
and finally save to a file.

You only can write to the document throught the write methods, but you
have a plenty of them, and a few shortcuts and automtism.

For last, the html code is in a single string called contents, that can
only be readed. The save in a html file is done at the end, calling a closing
method.


Screenshots

Not needed

Script

Get a more updated one here: http://usuarios.multimania.es/kisap/english_list.html

Expand to see the code.


Instructions

Nothing special. Just insert it before main.

Authors notes

All my scripts are in development and im open to suggestions, critics, bugs, etc.


Last edited by gerrtunk on Sat Jan 29, 2011 1:04 pm, edited 2 times in total.

Top Top
Profile      
 

    setanbedul
  Fri Jan 28, 2011 4:44 am
Member

:blush: I want to use this script
actualy can you give me example for this script..

could be this script can be use for create debug file or log file?

something like.. if I type 5 then this script will write log (show as html)???
======================
I failed..

i think the save function is failed..


Top Top
Profile      
 

    gerrtunk
  Fri Jan 28, 2011 11:31 am
Member

Dont use in the call script command of x. That totally sucks, because it dont support long lines, is a pain for debugging,etc.

Create a class named test, and in the initialize method, you paste all this code. Then you call it through a simple script call.

Other idea is to add a method for a exmplae to game party. Then you call the script $game_party.test_html and you will see what that does.

Quote:
could be this script can be use for create debug file or log file?

something like.. if I type 5 then this script will write log (show as html)???


Yes, actually i created it to manage better my scripts that work with text files (and also for learning purposes).

In this case, if you want to write a log, you have to call wLine o the shorter one wL each time, so it appends a line of text with the html format adding a newline simbol automtically to the end.

When you create the object i suggest you to select the page title(it will be shown in the explorer) and bgcolor there.

Then you call temporall formating with no extra argument so the changued format will work only for 1 line. You call for example:

doc.tForm doc.Form 'b, 30'

This will make that the next line is writed with bold and font size 30. Using this you write the header:

doc.L 'My log file'
doc.wBr 3 # you are adding 3 lines of separation

And then you append the lines you need after it in the way i said before. Note that it can be better to store the log lines in array and then call the wList that writes html lists based on a array of strings, so, if you have this array:

array = 'Error in wep', 'No problem with that', 'Etc'

wList array # All that strings are writed in a formated hmtl code.

PD: I have updated the script. Corrected a web bugs, improved documentation and added a tutorial. Check for it in the first post.


Top Top
Profile      
 

    setanbedul
  Mon Feb 07, 2011 6:28 am
Member

you miss end.. in
Expand to see the code.

you forgot 1 end in here..
and i'm try the script.. this is the step
* follow your instruction about place before main
* create an event (chara)
* use script and type like in example you type in script intro
Expand to see the code.

no error...
but I don't find any log.htm or log???


Top Top
Profile      
 

    gerrtunk
  Mon Feb 07, 2011 2:00 pm
Member

You are still using a call script with all that code? Dont do that. Try this:

Expand to see the code.


And in the event call $game_party.test_html

pd: i will fix that bug later, thanksfor the feedback


Top Top
Profile      
 

    setanbedul
  Wed Feb 09, 2011 2:03 am
Member

Thx for your reply
but the code was error in 17
Expand to see the code.

the repair version
Expand to see the code.
:rock:
anyway stil not save..


Top Top
Profile      
 

    gerrtunk
  Wed Feb 09, 2011 9:28 pm
Member

Thats because no endSave method is called. Read it carefully. Anyway i fixed the test example in 1.1:

Expand to see the code.


Top Top
Profile      
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 


Who is online

Users browsing this forum: No users and 8 guests


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

We are an independent, not-for-profit game making community.
Homepage
Board Index
About Us
Downloadable Games
Free Browser Games
Games in Development
RPG Maker Support
Game Maker Support
Construct 2 Support
HBGames the eZine
Advanced RPG Maker
Site Announcements
Powered by phpBB © phpBB Group