VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Command-Line Arguments Processor (1.8)

by Daniel Keep (3 Submissions)
Category: Libraries
Compatability: Visual Basic 5.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (10 Votes)

This is just a little module I threw together... must've been over three years ago. I've used it in nearly all my applications since. It basically takes the application's Command$ string, and turns it into a C/C++ style array of arguments. This is invaluable when writing apps that need to take arguments from the command line. It also has an added method IsSwitch() to find switches in your arguments (like /l, /swap or even complex ones that use pattern matching!)
D/L it and give it a try. -- Update 1.6b --: Well, I should've updated this earlier, but oh well. Fixes a problem with IsSwitch(), and re-introduces GetArgs()! GetArgs() is the original method, and allows you to specify not only a custom command-line, but also which arrays you want it to be processed into. -- Update 1.8 --: Ok, this is a pretty big update. It changes the naming scheme of the methods, adds a few, and removes one or two that weren't related. See the top comment for more info. Enjoy, and Merry Christmas!

Assumes
RTFM || Read The F... Flipping Manual... ;)

Rate Command-Line Arguments Processor (1.8)

Download Command-Line Arguments Processor (1.8)

Download Command-Line Arguments Processor (1.8) (5 KB)

Command-Line Arguments Processor (1.8) Comments

No comments have been posted about Command-Line Arguments Processor (1.8). Why not be the first to post a comment about Command-Line Arguments Processor (1.8).

Post your comment

Subject:
Message:
0/1000 characters