8 Replies Latest reply on Jan 26, 2011 10:49 AM by chris.campbell

    console feedback and multiple threads

    macromedical Level 1

      Hello,


      I mailed this message also to the air-tight group so sorry for double-reading if it happens to you.
      I created a little utility that grabs a screenshot from a url and saves it as a jpg/png image.
      It is intended to be a command line utility.

      I face two problems:

      1)
      I parse the startup arguments of the air program by calling it's windows  exewith arguments and listening for an onInvoke event and parsing the  arguments-array param returned (app.exe urlimage destination).
      When I launch a second instance on the command line I'm confronted with two air drawbacks:
          a) a second instance won't launch, nor does it seems I can configure the app at compilation time to allow that and
          b) I can't catch the onInvoke arguments[] a second time because when  launching the app again the event doesn't launches if the app (still /  already) has an instance. That way I have to wait for the previous  instance to be exited before I may use this utility again.
      2)
      I see alot of articles describing NativeProcesses, but the most basic  functionality of the air process iitself seems to lack: returning  program output to the console (via stdout?) where it was launched from  and not supporting error exiting codes or feedback massages. How on  earth can I let a parent invoker program know that the process compled  with succes or with an error? Not? Then it's time for the air team to  think about a SuperNativeProcessNeeds class I guess ? First the system  basics where all programs on earth thrive on, then the whistles I'd say.

      Any solutions are very welcome...

      Cheers,
      Latcho