home *** CD-ROM | disk | FTP | other *** search
/ PC Direkt 1998 November / PCDIREKT_1198.bin / data / Util / Brcmd / brcmline.faq < prev    next >
Encoding:
Text File  |  1998-04-15  |  10.5 KB  |  227 lines

  1.                      Bill Reid's Command Line 
  2.                     Frequently Asked Questions
  3.  
  4. ---------------------------------------------------------------------------
  5. Program Operation
  6. ---------------------------------------------------------------------------
  7.  
  8. Q: What is this program?
  9. A: It's a tool for helping folks who still enjoy controlling their
  10.    computers from a command prompt, but need the applications and
  11.    goodies only available in the Win32 GUI.
  12.  
  13. Q: How does it work?
  14. A: Typing a command and pressing "Enter" executes it.  
  15.  
  16.  
  17. Q: How do I get DOS commands to run?
  18. A: To launch a DOS command from within Win32, you have to preface 
  19.    it with "command /c".  To get a "dir" to work, you'd enter
  20.  
  21.    command /c dir
  22.  
  23. Q: Isn't there another way?
  24. A: Not in Win32.  But within this application, you can substitute
  25.    the symbol % to achieve the same effect, as
  26.  
  27.    %dir
  28.  
  29. Q: How are long filenames handled?
  30. A: The same way the 'Run' command does.  You need to enclose long 
  31.    filenames in double quotes in order for the program to properly
  32.    recognize them.
  33.  
  34.    Ie., if you want to refer to Wordpad in your Program Files\
  35.    Accessories    folder, you'll need to specify it with the quotes
  36.  
  37.    "C:\Program Files\Accessories\Wordpad"
  38.  
  39. Q: What about under DOS?
  40. A: The same way.  Quotes around the long filenames, exactly as you'd
  41.    type it at the DOS prompt.  Everything after the "command /c" or "%"
  42.    is passed verbatim to the OS's DOS interpreter.
  43.  
  44. Q: What are aliases?
  45. A: Aliases are keywords that serve to represent a command line in
  46.    shortened or more conveniently typed form.  By associating a 
  47.    command line with an alias, you can more easily execute those
  48.    long commands.
  49.  
  50.    For example, I might wish to associate 'pad' with the bulky line
  51.    "C:\Program Files\Accessories\Wordpad.exe".  From that point on,
  52.    typing 'pad' would essentially be the same as typing the longer
  53.    alternative.
  54.  
  55. Q: Can I use partial aliases?  Like alias a directory and add things
  56.    on the end to run different things?
  57. A: No.  Aliases are not links or anything like that.  If you alias 
  58.    the word 'pad' and enter 'pad mydoc.doc' you're going to get an 
  59.    error.  If enough people desire this feature, I'll look at adding
  60.    it in.
  61.  
  62. Q: Should I limit my aliases for better performance/less registry bloat?
  63. A: Aliases are stored in a text file in the same directory as the app.
  64.    Of course, the more you load in memory, the more memory is required, 
  65.    but the effect is pretty minimal.  You can keep an eye on the file
  66.    aliases.cfg to make sure it's not taking up more disk space than you
  67.    wish it to engulf.
  68.  
  69. Q: How does the history support work?
  70. A: Anything that appears in your command history (the items that recyle
  71.    when you use the up and down arrows or that appear in the block below 
  72.    the command line if you have the window sized large enough) appears 
  73.    there again on the next load of the program.  
  74.  
  75. Q: What if I don't want those items reloaded?
  76. A: Tough nuggies :)  Actually, you can set a registry key by hand.  Just 
  77.    add a string value named "History" and enter the value "1" (without the
  78.    quotes).  No more history actions. 
  79.  
  80. Q: What's a "permanent history" option?
  81. A: Basically, these items will appear in your history list no matter what.
  82.    Even if you "Clear History" and close the app with no entries in the
  83.    app history, these entries will come back.  Guaranteed to be there. 
  84.  
  85. Q: How do I make some permanent history items?
  86. A: In the application's directory, create a text file named "permhist.cfg".
  87.    Put any entries you wish in the file, seperating each with a carriage
  88.    return.  Like so:
  89.  
  90.    calc.exe
  91.    win.ini
  92.    %runmyapp /a /b
  93.  
  94.    If you're worried about your syntax being off, copy entries from the
  95.    history.cfg file (the other history listing, auto-generated by app) to
  96.    make sure it's workable.
  97.  
  98. Q: What if I don't want permanent history items?
  99. A: Do as mentioned for the "no history items" above, but name the string
  100.    value "PHistory".  Setting these options according to your desires 
  101.    should give you the most flexible history saving plan possible.
  102.  
  103. Q: What if I set those registry entries and changed my mind?
  104. A: Either delete the keys you created or set their value to "0" (without
  105.    the quotes).
  106.  
  107. Q: What is the registry?
  108. A: IF YOU HAVE TO ASK, YOU NEED TO STAY AWAY FROM IT!  The Registry is a
  109.    database that stores all sorts of configuration information about your
  110.    computer.  You can _seriously_ mess up your computer software with this
  111.    if you don't know what you're doing.  If you're not familiar with the
  112.    process of editing the registry, either learn or just be satisfied with
  113.    the default options.  I won't be responsible for what happens if you go
  114.    poking around in there changing values.
  115.  
  116. Q: Uhhh, where is the program's registry entry?
  117. A: HKEY_CURRENT_USER\Software\VB and VBA Program Settings\BRCmdLine\Defaults.
  118.    At least on Win95, anyway.
  119.  
  120. Q: Arrggh!  I was cleaning up and deleted those .cfg files!
  121. A: If it was history.cfg, no problem.  It gets created from your app's 
  122.    actions.  You'll get one session with no history, but no big deal
  123.    otherwise.  If you deleted permhist.cfg, you just need to recreate
  124.    it if you want those items.  If it was aliases.cfg - sorry, you'll
  125.    need to redefine them through the program again.  
  126.  
  127.    I use these text files to keep the registry entries down.  That's an
  128.    often accessed point, so I want to be a good Windows citizen and keep
  129.    the clutter out of there so I don't slow your system down unnecessarily.
  130.    The load time on the text files isn't really significant unless you have
  131.    loads of history items - and I think you'd rather have the slower load
  132.    time than a bloated registry, anyway.
  133.  
  134. Q: Why don't you include hotkey support?
  135. A: Because I prefer to leave that up to you! This is all about choices, 
  136.    remember?  Assign a hotkey to the shortcut to this application and it
  137.    will respect it by activating any running instances.  This also means
  138.    that you can't load 2 copies of the app simultaneously.
  139.  
  140. ---------------------------------------------------------------------------
  141. Work-arounds
  142. ---------------------------------------------------------------------------
  143.  
  144. Q: How can I specify a working directory?
  145. A: Within the application, you can't.  However, you can reference Win32
  146.    shortcut files from the command line, so you could configure a Win32
  147.    shortcut and run that from the command line.  You'll find the exact 
  148.    name of the shortcut if you do a "Properties" on it.
  149.  
  150. Q: My DOS command windows pop up and off before I can read them.
  151. A: That's because they're configured that way in a default Win95 setup.
  152.    You can change this by modifying your DOS prompt shortcut properties
  153.    to not "Close Window on Exit".  It's probably labeled "Command" and in
  154.    your Windows install directory.
  155.  
  156.  
  157. Q: Isn't this a lot of typing to be doing?  Where's the icons, menus, etc?
  158. A: You're getting the idea.  Some of us still feel we're more productive 
  159.    when we type.  You can "GUI out" and use the Browse menu option (or 
  160.    enter 'browse' as a keyword) to click your way to a file, if necessary.
  161.    But I won't be adding any toolbars anytime soon.
  162.  
  163. Q: You hypocrite!  Then why the big button on the left side of the box?!
  164. A: Because you need a mousable spot in order to get the thing in your
  165.    preferred position and a spot to launch the popup config menu from. The
  166.    only other option would be to replace the default "edit" right click
  167.    menu on the text area, but I assume people would like to keep that 
  168.    functionality open for themselves.  I don't want to cripple good Windows
  169.    features, after all - just add what I feel like the designers left out.
  170.    But in keeping with its philosophy, you can use the tab key to get over
  171.    to that button without diving into mouseland.
  172.  
  173. ---------------------------------------------------------------------------
  174. Problems
  175. ---------------------------------------------------------------------------
  176. Q: I get a "Run time error" or something like that when I try to launch the
  177.    program or access a feature.
  178. A: It's a problem with your runtime libraries.  The app requires the VB 5.0
  179.    runtime libraries and the common dialog control (COMDLG32.OCX).  Try to
  180.    install a reputable set of libraries from a software distribution site
  181.    on the Internet.  It's quite easy for some beta versions to get mixed in
  182.    with another developers' stuff and get a version on your hard drive that's
  183.    buggy.  
  184.  
  185. Q: Something ape-weird happened and the app isn't appearing when I run it
  186. Q: The thing just won't start up right!  Help!
  187. A: Probably the registry is not agreeing with your current setup.  Maybe
  188.    you changed screen size or color depth or something to that effect.  
  189.    Or maybe you just found a bug I didn't.
  190.  
  191.    The best thing to do in these situations is to remove the application's 
  192.    registry entries - it's programmed to find suitable defaults when there
  193.    aren't any in the registry.  You won't lose your aliases - they're in a
  194.    text file in the same directory as the application.  It will default up
  195.    in a suitable location and you can reposition/recolor it again.
  196.  
  197. ---------------------------------------------------------------------------
  198. Miscellany
  199. ---------------------------------------------------------------------------
  200.  
  201. Q: Who wrote this?
  202. A: Me :)
  203.  
  204. Q: How can I contact you?
  205. A: Via email, currently at breid@ebicom.net.  You can also reference my
  206.    wares at http://billreid.home.ml.org/ in the freeware section. 
  207.  
  208. Q: Uhhh.  I can't seem to browse/mail there.
  209. A: The Internet is a changing media, and it's very possible I may have
  210.    moved on by then.  If you need to keep up with me, keep an eye on the
  211.    shareware/freeware sites - I'll attempt to post any moves to those 
  212.    locations.  But in the meantime, you'll save yourself time by bookmarking
  213.    my page.
  214.  
  215. Q: What's the deal with naming the program after yourself?
  216. A: Just a bit of copyright protection.  I attach my name to the title of any
  217.    title that sounds like it probably was thought of before in order to avoid
  218.    any trademark infringement.  In real life, I'm actually very humble.
  219.  
  220. Q: Then why the big bitmaps of you in the app?
  221. A: OK, so humility isn't everything :)  Basically, I do this to help other 
  222.    people with stuff and to feel accomplishment in seeing my works flourish.
  223.    So the ego factor ticks in a little bit after all.  
  224.  
  225.    At least it's just my mug instead of another advertisement or a "You have
  226.    30 days left..." sentence :)
  227.