Page 1 of 1
arexx.class AM_EXECUTE doesn't work with PROGDIR:
Posted: Sat Nov 09, 2013 5:43 pm
by chris
This works:
Code: Select all
IDoMethod(arexx_obj, AM_EXECUTE, "Rexx/MyScript.rexx", NULL, NULL, NULL, NULL, NULL);
This doesn't:
Code: Select all
IDoMethod(arexx_obj, AM_EXECUTE, "PROGDIR:Rexx/MyScript.rexx", NULL, NULL, NULL, NULL, NULL);
I can only assume arexx.class has its own ideas what PROGDIR: points to, but none of the other libraries/classes behave like this AFAIK.
Re: arexx.class AM_EXECUTE doesn't work with PROGDIR:
Posted: Sun Nov 10, 2013 5:04 pm
by xenic
@chris
If you look at the underlying LaunchArexxScript() function in rexxsyslib autodocs it looks like a request (message?) is passed to Rexx resident process to launch your ARexx script. If that's the case, then PROGDIR: might resolve to the directory that "RexxMast" was started from (SYS:System).
Try running Snoopy while your program attempts to run the script with PROGDIR: as the location. You should be able to tell where RexxMast is looking for your script with a lock() or open() command.
Re: arexx.class AM_EXECUTE doesn't work with PROGDIR:
Posted: Sun Nov 10, 2013 9:52 pm
by salass00
As xenic says the command is sent asynchronously so you should get an absolute path and use it like so:
Code: Select all
TEXT scriptname[1024];
IDOS->NameFromLock(IDOS->GetProgramDir(), scriptname, sizeof(scriptname));
IDOS->AddPart(scriptname, "Rexx/MyScript.rexx", sizeof(scriptname));
IIntuition->IDoMethod(arexx_obj, AM_EXECUTE, scriptname, NULL, NULL, NULL, NULL, NULL);
Re: arexx.class AM_EXECUTE doesn't work with PROGDIR:
Posted: Mon Nov 11, 2013 7:38 pm
by chris
I worked around it using DevNameFromLock()
So it's not a real bug but a side-effect of it running in RexxMast's context. That's fine then, now I know.
Thanks
Re: arexx.class AM_EXECUTE doesn't work with PROGDIR:
Posted: Sat Nov 30, 2013 12:48 am
by broadblues
This excatly the issue I came across with SketchBlock and launching arexx commands and why I setup a Sketchpath: assign.