Shoutbox

need help - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: need help (/showthread.php?tid=77002)

need help by Drakal on 08-25-2007 at 02:53 PM

how do i do so it says

-(my script) info:*
-(my script) has x lines
-(my script) is x kb big
-(my script) has x files and x maps
-(my script) is active/inaktiv*
or something in the debug window but x are the real number...?
*= that i already know

-(my script) info:*
-(my script) has 303 lines
-(my script) is 174 kb big
-(my script) has 6 files and 2 maps
-(my script) is active*

that was the info on my script:P


RE: need help by roflmao456 on 08-25-2007 at 03:19 PM

you could try your hand at using some FSO functions :)

http://www.tutorial-web.com/asp/fso/

for example:

code:
// Code to get the size of a file
var fso = new ActiveXObject("Scripting.FileSystemObject");
Debug.Trace(fso.GetFile("C:\\test.txt").Size); // probably 0 kb.


and as for  the active and inactive.. i think you will have to use the registry.

Reg: HKCU/Software/Patchou/Messenger Plus! Live/GlobalSettings/Scripts/<scriptname>
and then the DWORD called Enabled will be there and will specify a value of 1 for enabled or 0 for disabled
RE: need help by Drakal on 08-25-2007 at 05:21 PM

thx :D
but i said that i already know how to show if it is active or not... didnt u read "*=that i already know"?

edit: spell fix


RE: need help by matty on 08-25-2007 at 05:50 PM

quote:
Originally posted by roflmao456
Debug.Trace(fso.GetFile("C:\test.txt").Size); // probably 0 kb.
Should be
code:
Debug.Trace(fso.GetFile("C:\\test.txt").Size); // probably 0 kb.

RE: need help by Drakal on 08-26-2007 at 10:03 AM

it works... but only with one file:( how do i do so it says the size of the whole folder?(fixed :P it was only to change getfile to getfolder... but it says in byte:( i want Kb how do i get is so?)(<--- that is fixed to:D felipEx helped me)

want it to say numbers of lines in script to:/

Finished code for the size:

code:
var fso = new ActiveXObject("Scripting.FileSystemObject");
    var kb = fso.GetFolder("C:\\Program\\Messenger Plus! Live\\Scripts\\Bad Word Filter").Size/1024;
    Debug.Trace("  -Bad Word filter is "+ kb.toString().substr(0, kb.toString().indexOf(".")+3 )+ "Kb");

--------------------------------------------------------------------
  >Bad Word Filter status:
  -Bad Word Filter is 252.69 Kb
  -Bad Word Filter has 528 lines
  -Bad Word Filters outgoing filter is: Activated
  -Bad Word Filters ingoing filter is: Deactivated

only the lines i need help with now

(fixed:D felipEx helped me again:D)
--------------------------------------------------------

it would be nice if someone helped me with the thing with how many files and folders it is in the mainfolder for my script... but it is not so important that the other things was :P