Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

The only way to learn a new programming language is by writing programs in it. -- Brian Kernighan


computers / alt.bbs.mystic / Mystic Program Question

SubjectAuthor
* Mystic Program QuestionMike Fenton
`* Re: Mystic Program Questiong00r00
 `* Mystic Program QuestionMike Fenton
  `* Re: Mystic Program Questiong00r00
   `* Mystic Program QuestionMike Fenton
    `* Re: Mystic Program Questiong00r00
     `* Mystic Program QuestionMike Fenton
      `* Re: Mystic Program Questiong00r00
       +- Re: Mystic Program Questiong00r00
       +- Mystic Program QuestionMike Fenton
       `- Mystic Program QuestionMike Fenton

1
Mystic Program Question

<2086060343@f310.n229.z1.fidonet.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1590&group=alt.bbs.mystic#1590

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!i2pn.org!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.Mike.Fenton@f310.n229.z1.fidonet.org (Mike Fenton)
Newsgroups: alt.bbs.mystic
Subject: Mystic Program Question
Date: Wed, 04 Jan 2023 20:59:08 +1300
Organization: Agency HUB, Dunedin - New Zealand | bbs.nz/#Fidonet
Message-ID: <2086060343@f310.n229.z1.fidonet.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: news.bbs.nz; posting-host="8IWYKlztXHa0+IViEdY46zrq8kpk7dC9fTbT74JiSDQ";
logging-data="20624"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-MailConverter: SoupGate-Win32 v1.05
X-Comment-To: g00r00
 by: Mike Fenton - Wed, 4 Jan 2023 07:59 UTC

I'm in the process of creating a program and the following works perfect under
linux but under windows it cuts out the length of the command.

I basically have menucmd('DD','command ' + var + var1 + var2 +var3 + 'something
' + var4 + '')

So the length of this command sent to the command line is very long and works
fine under linux, but gets cut short under windows.

Is there some type of limitation on the windows side?

.... A program is used to turn data into error messages.

Re: Mystic Program Question

<3115904296@f215.n129.z1.fidonet.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1593&group=alt.bbs.mystic#1593

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!rocksolid2!news.neodome.net!xmission!csiph.com!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.g00r00@f215.n129.z1.fidonet.org (g00r00)
Newsgroups: alt.bbs.mystic
Subject: Re: Mystic Program Question
Date: Thu, 05 Jan 2023 10:15:39 +1300
Organization: Agency HUB, Dunedin - New Zealand | bbs.nz/#Fidonet
Message-ID: <3115904296@f215.n129.z1.fidonet.org>
References: <2086060343@f310.n229.z1.fidonet.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: news.bbs.nz; posting-host="8IWYKlztXHa0+IViEdY46zrq8kpk7dC9fTbT74JiSDQ";
logging-data="4397"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-MailConverter: SoupGate-Win32 v1.05
X-Comment-To: Mike Fenton
 by: g00r00 - Wed, 4 Jan 2023 21:15 UTC

MF> I'm in the process of creating a program and the following works perfect
MF> under linux but under windows it cuts out the length of the command.
MF>
MF> I basically have menucmd('DD','command ' + var + var1 + var2 +var3 +
MF> 'something ' + var4 + '')

There shouldn't be any difference between Linux and Windows. I am assuming
this is MPL? Are you talking about the MIDE editor or where are you seeing
this?

I do think there is a limit to the length of the menu command data and its
around 200 characters, but that also exists in Linux as well. I can expand on
that limit if needed though.

.... (A)bort, (R)etry, (I)nfluence with large hammer.

Mystic Program Question

<398229940@f310.n229.z1.fidonet.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1595&group=alt.bbs.mystic#1595

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!i2pn.org!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.Mike.Fenton@f310.n229.z1.fidonet.org (Mike Fenton)
Newsgroups: alt.bbs.mystic
Subject: Mystic Program Question
Date: Thu, 05 Jan 2023 12:31:45 +1300
Organization: Agency HUB, Dunedin - New Zealand | bbs.nz/#Fidonet
Message-ID: <398229940@f310.n229.z1.fidonet.org>
References: <3115904296@f215.n129.z1.fidonet.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: news.bbs.nz; posting-host="8IWYKlztXHa0+IViEdY46zrq8kpk7dC9fTbT74JiSDQ";
logging-data="5410"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-MailConverter: SoupGate-Win32 v1.05
X-Comment-To: g00r00
 by: Mike Fenton - Wed, 4 Jan 2023 23:31 UTC

g0>
g0> There shouldn't be any difference between Linux and Windows. I am
g0> assuming this is MPL? Are you talking about the MIDE editor or where
g0> are you seeing this?

No, not mide. It's the output I see in the logs and the fact the full command
is not sent. It works under linux, same command, but not under windows.

The easiest way to probably recreate this is to create a MPL with a
menucmd('DD', 'input a very long line') and run that from windows and then from
linux. Watch the logs and you will see that it gets cut short on the windows
end.

.... I am NOT a tagline THIEF. I am a tagline CONSERVATIONIST.

Re: Mystic Program Question

<365188826@f215.n129.z1.fidonet.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1597&group=alt.bbs.mystic#1597

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!i2pn.org!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.g00r00@f215.n129.z1.fidonet.org (g00r00)
Newsgroups: alt.bbs.mystic
Subject: Re: Mystic Program Question
Date: Thu, 05 Jan 2023 13:16:23 +1300
Organization: Agency HUB, Dunedin - New Zealand | bbs.nz/#Fidonet
Message-ID: <365188826@f215.n129.z1.fidonet.org>
References: <398229940@f310.n229.z1.fidonet.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: news.bbs.nz; posting-host="8IWYKlztXHa0+IViEdY46zrq8kpk7dC9fTbT74JiSDQ";
logging-data="6722"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-Comment-To: Mike Fenton
X-MailConverter: SoupGate-Win32 v1.05
 by: g00r00 - Thu, 5 Jan 2023 00:16 UTC

MF> The easiest way to probably recreate this is to create a MPL with a
MF> menucmd('DD', 'input a very long line') and run that from windows and
MF> then from linux. Watch the logs and you will see that it gets cut short
MF> on the windows end.

Seems ok to me in Windows. The text I did is probably about 150 characters
long and it seems to be executing fine. Do you have any other ideas on how I
could reproduce the problem?

------------------- Node 1 (Mystic v1.12 A48 2023/01/04)
2023.01.05 13:14:19 Connect from local (local)
2023.01.05 13:14:20 g00r00 logged in
2023.01.05 13:14:20 Setting time left to 1400
2023.01.05 13:14:20 Setting menu to "prelogin" (Default start menu)
2023.01.05 13:14:23 MPL execute: \mystic\test1.mpx
2023.01.05 13:14:23 Executing: This is a very long string operation and it
might cause an issue in windows with the text getting cut off so we will have
to execute and find out what happens
2023.01.05 13:14:23 Execution complete: 1
2023.01.05 13:14:24 User logged off
2023.01.05 13:14:24 Shutting down

.... Intelligence tests are biased toward the literate.

Mystic Program Question

<1910284233@f310.n229.z1.fidonet.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1601&group=alt.bbs.mystic#1601

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!i2pn.org!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.Mike.Fenton@f310.n229.z1.fidonet.org (Mike Fenton)
Newsgroups: alt.bbs.mystic
Subject: Mystic Program Question
Date: Thu, 05 Jan 2023 19:18:52 +1300
Organization: Agency HUB, Dunedin - New Zealand | bbs.nz/#Fidonet
Message-ID: <1910284233@f310.n229.z1.fidonet.org>
References: <365188826@f215.n129.z1.fidonet.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: news.bbs.nz; posting-host="8IWYKlztXHa0+IViEdY46zrq8kpk7dC9fTbT74JiSDQ";
logging-data="11787"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-MailConverter: SoupGate-Win32 v1.05
X-Comment-To: g00r00
 by: Mike Fenton - Thu, 5 Jan 2023 06:18 UTC

g0> Seems ok to me in Windows. The text I did is probably about 150
g0> characters long and it seems to be executing fine. Do you have any
g0> other ideas on how I could reproduce the problem?
g0>

Unless I'm pushing over 200 characters under windows not realizing. The command
is slightely different.

Is there anyway to get this character limit increased? I can then test on my
end?

.... Why is the man who invests all your money called a broker?

Re: Mystic Program Question

<363035506@f215.n129.z1.fidonet.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1603&group=alt.bbs.mystic#1603

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!rocksolid2!news.neodome.net!csiph.com!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.g00r00@f215.n129.z1.fidonet.org (g00r00)
Newsgroups: alt.bbs.mystic
Subject: Re: Mystic Program Question
Date: Thu, 05 Jan 2023 20:55:51 +1300
Organization: Agency HUB, Dunedin - New Zealand | bbs.nz/#Fidonet
Message-ID: <363035506@f215.n129.z1.fidonet.org>
References: <1910284233@f310.n229.z1.fidonet.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: news.bbs.nz; posting-host="8IWYKlztXHa0+IViEdY46zrq8kpk7dC9fTbT74JiSDQ";
logging-data="13822"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-Comment-To: Mike Fenton
X-MailConverter: SoupGate-Win32 v1.05
 by: g00r00 - Thu, 5 Jan 2023 07:55 UTC

MF> Unless I'm pushing over 200 characters under windows not realizing. The
MF> command is slightely different.
MF>
MF> Is there anyway to get this character limit increased? I can then test
MF> on my end?

Ok so I did a review of code now that I am not at work. Here's the deal:

The menu editor is limited to 250 characters now (up from 200) for the optional
data field. In MPL there is a hard limitation of 255 characters which is an
MPL limitation on all OSes that I cannot easily extend.

If you need to go longer than 255 from MPL then you'd have to write the
command(s) to a .bat file in the node's temp directory and then execute the
..bat file. It'd probably be good to delete the .bat after running as well.

You can also use Mystic Python which has the same MenuCmd function that should
be able to handle the full 8000 character command line length that Windows
allows.

Sorry I don't have better news on this one. I do want to expand on MPL 255
limit someday, but honestly its a pretty low priority these days.

.... Just another prisoner of gravity!

Mystic Program Question

<3580332103@f310.n229.z1.fidonet.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1605&group=alt.bbs.mystic#1605

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!rocksolid2!news.neodome.net!csiph.com!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.Mike.Fenton@f310.n229.z1.fidonet.org (Mike Fenton)
Newsgroups: alt.bbs.mystic
Subject: Mystic Program Question
Date: Thu, 05 Jan 2023 21:25:47 +1300
Organization: Agency HUB, Dunedin - New Zealand | bbs.nz/#Fidonet
Message-ID: <3580332103@f310.n229.z1.fidonet.org>
References: <363035506@f215.n129.z1.fidonet.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: news.bbs.nz; posting-host="8IWYKlztXHa0+IViEdY46zrq8kpk7dC9fTbT74JiSDQ";
logging-data="14841"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-Comment-To: g00r00
X-MailConverter: SoupGate-Win32 v1.05
 by: Mike Fenton - Thu, 5 Jan 2023 08:25 UTC

g0> The menu editor is limited to 250 characters now (up from 200) for the
g0> optional data field. In MPL there is a hard limitation of 255
g0> characters which is an MPL limitation on all OSes that I cannot easily
g0> extend.

This is the part that confuses me. It works under linux but not windows. Grant
you the windows call I do is a bit longer....

I did attempt to write this to a file using appendtext and when I did it this
way, the information contained in the bat file was also cut off. It wasn't
passing all the information. Seemed like a limit there too....

I will review again and see what I can do... Just strange...

.... Oxymoron: Race walking

Re: Mystic Program Question

<3639763696@f215.n129.z1.fidonet.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1607&group=alt.bbs.mystic#1607

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!i2pn.org!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.g00r00@f215.n129.z1.fidonet.org (g00r00)
Newsgroups: alt.bbs.mystic
Subject: Re: Mystic Program Question
Date: Thu, 05 Jan 2023 22:37:03 +1300
Organization: Agency HUB, Dunedin - New Zealand | bbs.nz/#Fidonet
Message-ID: <3639763696@f215.n129.z1.fidonet.org>
References: <2263585464@f215.n129.z1.fidonet.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: news.bbs.nz; posting-host="8IWYKlztXHa0+IViEdY46zrq8kpk7dC9fTbT74JiSDQ";
logging-data="15850"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-MailConverter: SoupGate-Win32 v1.05
X-Comment-To: Mike Fenton
 by: g00r00 - Thu, 5 Jan 2023 09:37 UTC

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

Re: Mystic Program Question

<2263585464@f215.n129.z1.fidonet.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1608&group=alt.bbs.mystic#1608

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!i2pn.org!news.neodome.net!csiph.com!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.g00r00@f215.n129.z1.fidonet.org (g00r00)
Newsgroups: alt.bbs.mystic
Subject: Re: Mystic Program Question
Date: Thu, 05 Jan 2023 22:21:05 +1300
Organization: Agency HUB, Dunedin - New Zealand | bbs.nz/#Fidonet
Message-ID: <2263585464@f215.n129.z1.fidonet.org>
References: <3580332103@f310.n229.z1.fidonet.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: news.bbs.nz; posting-host="8IWYKlztXHa0+IViEdY46zrq8kpk7dC9fTbT74JiSDQ";
logging-data="15850"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-MailConverter: SoupGate-Win32 v1.05
X-Comment-To: Mike Fenton
 by: g00r00 - Thu, 5 Jan 2023 09:21 UTC

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 Program Question

<2623839772@f310.n229.z1.fidonet.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1609&group=alt.bbs.mystic#1609

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!i2pn.org!news.neodome.net!csiph.com!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.Mike.Fenton@f310.n229.z1.fidonet.org (Mike Fenton)
Newsgroups: alt.bbs.mystic
Subject: Mystic Program Question
Date: Fri, 06 Jan 2023 05:33:12 +1300
Organization: Agency HUB, Dunedin - New Zealand | bbs.nz/#Fidonet
Message-ID: <2623839772@f310.n229.z1.fidonet.org>
References: <2263585464@f215.n129.z1.fidonet.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: news.bbs.nz; posting-host="8IWYKlztXHa0+IViEdY46zrq8kpk7dC9fTbT74JiSDQ";
logging-data="23087"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-MailConverter: SoupGate-Win32 v1.05
X-Comment-To: g00r00
 by: Mike Fenton - Thu, 5 Jan 2023 16:33 UTC

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.

Mystic Program Question

<2477393369@f310.n229.z1.fidonet.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1610&group=alt.bbs.mystic#1610

  copy link   Newsgroups: alt.bbs.mystic
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!news.quux.org!news.bbs.nz!.POSTED.agency.bbs.nz!not-for-mail
From: nospam.Mike.Fenton@f310.n229.z1.fidonet.org (Mike Fenton)
Newsgroups: alt.bbs.mystic
Subject: Mystic Program Question
Date: Fri, 06 Jan 2023 12:50:51 +1300
Organization: Agency HUB, Dunedin - New Zealand | bbs.nz/#Fidonet
Message-ID: <2477393369@f310.n229.z1.fidonet.org>
References: <2263585464@f215.n129.z1.fidonet.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: news.bbs.nz; posting-host="8IWYKlztXHa0+IViEdY46zrq8kpk7dC9fTbT74JiSDQ";
logging-data="30196"; mail-complaints-to="abuse@news.bbs.nz"
User-Agent: VSoup v1.2.9.47Beta [95/NT]
X-MailConverter: SoupGate-Win32 v1.05
X-Comment-To: g00r00
 by: Mike Fenton - Thu, 5 Jan 2023 23:50 UTC

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>

This worked great! Thanks.

.... Marriage is one of the chief causes of divorce

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor