sfk 1.7.2: (incorrect?) detection of a command line

DV
2014-08-11
2014-10-15
  • DV
    DV
    2014-08-11

    Hi,
    I have a batch file that I usually use to run different console tools in their own console window and wait until a key is pressed. Here it is:

    @echo off  
    start "%~1" cmd /C "%* & pause"
    

    However, when I start SFK 1.7.2 via this batch file, it shows me:

    Swiss File Knife is a program for the command line.  
    It cannot be used by double clicking on the 'sfk' icon.  
    ...
    

    Why so? It looks like SFK does not detect it is run under the console in this case...

     
  • stahlworks
    stahlworks
    2014-08-12

    if sfk is started in a new console window without parameters, then in 99 percent of cases this means someone double clicked on the .exe from explorer. it is important to show a special information in this case.

    in your case, add one or more parameters and it should work. for the main help text you may use:

    sfk dump-main-help
    
     
  • DV
    DV
    2014-10-14

    Anyway, the implementation of the part "Enter anything to close this window now" constantly confuses me... IMHO, it should say "Type any key to close this window" and should be closed by a single keypress on any button. (Whereas currently one can enter quote a few letters or even sentences in sfk's console window - and the window will be closed only after Enter is pressed.)

     
  • stahlworks
    stahlworks
    2014-10-15

    text will be changed to "press enter to close this window now".