Page 1 of 1

Can Atrium Launch Executable Files

Posted: Fri Nov 02, 2012 6:33 am
by brett.elston
Hi, please could you tell me if it is possible to launch an executable (.EXE) from within the Atrium menu control? In addition to our iSeries applications we have an external application that we woul like to evoke. Regards Brett

Re: Can Atrium Launch Executable Files

Posted: Fri Nov 02, 2012 11:02 am
by David
A browser has bulit-in security which prevents direct access to local files and programs. The only way to launch executables is through a browser plug-in (like Java, ActiveX, etc.).

We do provide a Java applet that can be used for this, although there is not an easy, pre-made option for doing this in Atrium and it's not really designed to do this at all.

That said, it is technically possible to do this using the applet, but will take a bit of HTML and JavaScript "know how", and may not work as seamlessly as you'd like.

See documentation here for the applet we provide:

http://www.profoundlogic.com/docs/displ ... ration+API

One way that you could use this from Atrium would be to:

1. Set up the menu option as "web application".

2. Point any menu option you want to do this with at the same HTML page w/applet loaded on.

3. Use query string parameter on the URL to tell the page what executable to run or what to do.

4. Using some JavaScript code, read the information from the query string, and call the runPCCommand() API to invoke the required executable.

You can preload the applet onto the page with this HTML code:

Code: Select all


  <applet id="PCCommandApplet" name="PCCommandApplet" 
    archive="/profoundui/proddata/applet/PCIntegration.jar"
    code="com.profoundlogic.genie.PCIntegration" 
    style="height: 0px; width: 0px;" >
  </applet>

And the JS API for it w/this:

Code: Select all


<script type="text/javascript" src="/profoundui/proddata/js/runtime.js"></script>

Then using the page's "onload" event, you could read the query string parameter info and call "runPCCommand()" to invoke an executable.

What will happen, though, is that Atrium will load your blank browser page, so you'd probably need to do something with that. Maybe if the page were opened in a new window (instead of Atrium tab) and the onload event closed it directly after running the executable it would work.

Your executable is not going to launch within Atrium -- it will just come up in a normal window outside of the browser.

Re: Can Atrium Launch Executable Files

Posted: Mon Nov 05, 2012 2:06 am
by brett.elston
Thank you very much for your detailed answer. It is good to know it is possible. We have, I guess, a somewhat similar work-around by having RDF application with a "Launch Application"button and a js running runpccommand. I have been investigating if this was the best approach or if there was a better technical solution. I imagine that there is not much in it between the two approaches? Best Regards

Re: Can Atrium Launch Executable Files

Posted: Mon Nov 05, 2012 8:42 am
by David
No, I don't think there is too much difference between those 2 techniques.