Hi,
I'm trying to execute an ARexx script that is part of my C program (the script is in a C character array). I'm using arexx.class.
Executing the script from an external file ("test.rexx") works fine:
IIntuition->IDoMethod ( oArexx, AM_EXECUTE, "test.rexx", NULL, NULL, NULL, NULL, NULL );
I can also execute a single ARexx command by quoting it
IIntuition->IDoMethod ( oArexx, AM_EXECUTE, "\"say 'Hello there!'\"", NULL, NULL, NULL, NULL, NULL );
but not a long multi-line script with subroutines. Can it be done using the arexx.class?
Try with
https://www.os4depot.net/share/development/example/reaction_examples.lha
it has an ARexxExample.c that runs demo.rexx
So you can comapre and see if you have some missing part/code.
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonRX550/SSD240GB/DVDRW :-P
I checked the ARexxExample.c and it executes ARexx script that is on an external file. So no help there. It seems that arexx.class cannot execute "string files", i.e. scripts that are in RAM. I have to find another way to execute embedded script.
The only other option that I can think of is sending the script directly to the RexxMaster's REXX port as a RexxMsg message. The RexxMsg structure has an rm_Action member. I guess that I need to set the right value there to make it work: RXCOMM or RXFUNC?
ok, I read wrongly, as I though you had problems when trying to execute "demo.rexx" files.
Maybe you can create such looong rexx to a file in T: and run it like "T:foobar.rexx" and then delete file.
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonRX550/SSD240GB/DVDRW :-P