TIP: Click on subject to list as thread! ANSI
echo: mystic
to: Mike Fenton
from: g00r00
date: 2023-01-05 22:21:00
subject: Re: Mystic Program Questi

 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

--- Mystic BBS v1.12 A48 (Windows/64)
                          
* Origin: Sector 7 * Mystic WHQ (1:129/215)

SOURCE: echomail via QWK@pharcyde.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.