Menu

rexx or rexhide

Igor
2014-04-13
2015-01-03
  • Igor

    Igor - 2014-04-13

    i can run rexx.exe c:\room\test.rex or rexxhide.exe c:\room\test.rex. is it possible to determine in code (test.rex) what engine i run?

    taks!

     
    • Mark Miesfeld

      Mark Miesfeld - 2014-04-13

      Hi Igor,

      I'm pretty sure it is not possible to determine in test.rex what executable
      started the interpreter. What do you need to do at run-time? Maybe there
      is some other way to do what you want.

      --
      Mark Miesfeld

      On Sun, Apr 13, 2014 at 8:45 AM, Igor ingvaring@users.sf.net wrote:

      i can run rexx.exe c:\room\test.rex or rexxhide.exe c:\room\test.rex. is
      it possible to determine in code (test.rex) what engine i run?

      taks!


      rexx or rexhide


      Sent from sourceforge.net because you indicated interest in <
      https://sourceforge.net/p/oorexx/discussion/408477/>

      To unsubscribe from further messages, please visit <
      https://sourceforge.net/auth/subscriptions/>

       
  • Igor

    Igor - 2014-04-14

    sometime i need run rexx script only via hide engine or console, despite of extension(.rexh) or manual run etc. pseudo code
    /
    rexx*/
    if engine='rexxhide' then do
    'start rexx.exe' .context~name
    exit
    end if
    ...

     
  • Jeremy Nicoll

    Jeremy Nicoll - 2015-01-03

    Yes, you can do this. Either call an external utility, eg SysInternals' pslist and pass to it the processid under which you are running - from SysQueryProcess("PID"), ie issue

    "pslist" sysquery("PID")

    (and eg redirect the output to a file then read the file),

    or use WMI (which is an interface to a sort of database of facts abouts what's running under windows at any one time) to see all sort of info about your process (or other processes) active at the time. For example I've an exec that lists rexx-related processes, and optionally what their threads are doing.

    I attached it to another reply further down this discussion.

     

    Last edit: Jeremy Nicoll 2015-01-03
  • Jeremy Nicoll

    Jeremy Nicoll - 2015-01-03

    (ignore this reply)

     

    Last edit: Jeremy Nicoll 2015-01-03
  • Jeremy Nicoll

    Jeremy Nicoll - 2015-01-03

    Hang on, maybe I can attach it...

     
  • Jeremy Nicoll

    Jeremy Nicoll - 2015-01-03

    Hooray!

     

Log in to post a comment.