How to execute ARexx script from memory?

1 post / 0 new
jap
jap's picture
Offline
Last seen: 15 hours 32 min ago
Joined: 2011-06-04 05:53
How to execute ARexx script from memory?

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:

  1. IIntuition->IDoMethod (
  2. oArexx,
  3. AM_EXECUTE,
  4. "test.rexx",
  5. NULL,
  6. NULL,
  7. NULL,
  8. NULL,
  9. NULL
  10. );

I can also execute a single ARexx command by quoting it

  1. IIntuition->IDoMethod (
  2. oArexx,
  3. AM_EXECUTE,
  4. "\"say 'Hello there!'\"",
  5. NULL,
  6. NULL,
  7. NULL,
  8. NULL,
  9. NULL
  10. );

but not a long multi-line script with subroutines. Can it be done using the arexx.class?