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