Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.bbs.mystic    |    Mystic Sysops are mystical nerds...    |    11,842 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 11,195 of 11,842    |
|    g00r00 to All    |
|    Re: Mystic Program Question    |
|    05 Jan 23 22:37:03    |
   
   From: nospam.g00r00@f215.n129.z1.fidonet.org   
      
   Here is a cleaner example of executing a command line up to 1000 characters if   
   you split it into 4 chunks of 255:   
      
   Uses CFG   
      
   Function LargeCommand (Name: String; C1, C2, C3, C4: String) : String;   
   Var   
    F : File;   
   Begin   
    If OSType = 0 or OSType = 4 Then // Windows or OS/2   
    Name := Name + '.bat'   
    Else   
    Name := Name + '.sh';   
      
    fAssign (F, CfgTempPath + Name, 66);   
    fReWrite (F);   
    fWriteStr (F, C1);   
    fWriteStr (F, C2);   
    fWriteStr (F, C3);   
    fWriteLn (F, C4);   
    fClose (F);   
      
    LargeCommand := CfgTempPath + Name;   
   End;   
      
   Var   
    Command : String;   
   Begin   
      
    Command := LargeCommand(   
    'mybatch', // Filename (.bat or .sh will be added)   
    'Large command line part 1', // Part 1 of long command   
    'Large command line part 2', // Part 2 of long command   
    '', // Part 3 of long command   
    '' // Part 4 of long command   
    );   
      
    // Large command returns the path and filename of the batch file so we can   
    // take that and execute then delete it:   
      
    //MenuCmd ('DD', Command);   
    //FileErase (Command);   
   End.   
      
   ... A book misplaced is a book lost   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca