Page 1 of 1

Function Library

Posted: 04 Jun 2011 17:19
by Cleptography
Library of all the functions you can find here http://www.dostips.com/DtCodeCmdLib.php
With a couple of others and some modifications. Context help included. Would be nice to convert this all to macros as Ed has suggested. Examples need to be updated, more testing as well needs to be done. If you find any bugs let me know or just fix them. Oh whatever phpbb only allows 60000 chars I have 112452 I will give a link to download it here http://www.kripit.com/dosFunctions/functions.txt It is in the form of a text doc.
Simple usage:

Code: Select all

functions.bat _funcName args

Re: Function Library

Posted: 04 Jun 2011 17:45
by Ed Dyreen

Code: Select all

if /i ["%~1"]==["_brotate"]  shift&&goto :_brotate
if /i ["%~1"]==["_chclst"]   shift&&goto :_chclst
if /i ["%~1"]==["_cmpftime"] shift&&goto :_cmpftime

Hardcoding isn't necessary, or is this your intention ?

You did a great job, but how about splitting them for quicker lookup ?
FileDir.CMD
User.CMD
Net.CMD
Math.CMD
String.CMD
I hate scrolling through large files. You like ?

Re: Function Library

Posted: 04 Jun 2011 17:54
by Cleptography
Ed Dyreen wrote:Hardcoding isn't necessary, or is this your intention ?
You did a great job, but how about splitting them for quicker lookup ?
FileDir.CMD
User.CMD
Net.CMD
Math.CMD
String.CMD
I hate scrolling through large files. You like ?


It was my intention but that can always change. Scrolling doesn't bother me I read fast or just use ctrl+f to get to what I need. I thought about splitting them, as I usually do but then we end up with a dir full of files, I guess it is just a matter of personal preference. I think someone for autoit built a script that searched through thousands of lines and pulled up exactly what was needed. It would be nice if we could do this with a batch. I think there is a func somewhere in there that will get all the func in the script... _getfunc should list them all. :? ...maybe add something that would give the ln number... ideas ideas.

Re: Function Library

Posted: 05 Jun 2011 17:23
by Ed Dyreen
with a dir full of files

Ah no, we place:
all functions that deal with files or dirs under FileDir
all functions that deal with networking under Net
etc..
I don't mean one file for every function !

Place all functions in one file, or one file for every function, or related functions per file.

But related functions per file seems best to me. That way you only need a few files, like I suggested.
I already wrote my code this way so...