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,196 of 11,842    |
|    g00r00 to All    |
|    Re: Mystic Program Question    |
|    05 Jan 23 22:21:05    |
   
   From: nospam.g00r00@f215.n129.z1.fidonet.org   
      
    MF> I did attempt to write this to a file using appendtext and when I did it   
    MF> this way, the information contained in the bat file was also cut off. It   
    MF> wasn't passing all the information. Seemed like a limit there too....   
      
   Yep AppendText would have the same limit. Strings in MPL are limited to 255   
   characters everywhere.   
      
   To do it in MPL you have to break it up into small chunks and then write it to   
   the file. Here is a quick example I whipped up for you (you could also check   
   the OSID function and make it create a .sh in Unix and .bat in Windows):   
      
   Uses CFG   
      
   Var   
    F : File;   
    Cmd1 : String;   
    Cmd2 : String;   
    Cmd3 : String;   
    BatchName : String;   
   Begin   
    Cmd1 := 'REM This is the first part of a long command. ';   
    Cmd2 := 'And this is part two of a long commmand. ';   
    Cmd3 := 'And this is part three of a long command';   
      
    Write ('Command line: ');   
    Write (Cmd1)   
    Write (Cmd2)   
    WriteLn (Cmd3)   
      
    fAssign (F, CfgTempPath + 'mybat.bat', 66);   
    fReWrite (F);   
    fWriteStr (F, Cmd1);   
    fWriteStr (F, Cmd2);   
    fWriteLn (F, Cmd3);   
    fClose (F);   
      
    WriteLn ('Batch file created. Press any key to execute and delete: |PN');   
      
    MenuCmd('DD', CfgTempPath + 'mybat.bat');   
      
    FileErase (CfgTempPath + 'mybat.bat');   
   End.   
      
   ... The dog ate my .REP packet   
      
   --- 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