Can Atrium Launch Executable Files
-
- Profound User
- Posts: 62
- Joined: Fri Nov 02, 2012 6:28 am
- First Name: Brett
- Last Name: Elston
- Company Name: NAC
- Phone: Lanseria
- Address 1: Johannesburg
- State / Province: Outside Canada/USA
- Country: South Africa
- Contact:
Can Atrium Launch Executable Files
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
- David
- Profound Logic Staff Member
- Posts: 690
- Joined: Fri Jan 04, 2008 12:11 pm
- First Name: David
- Last Name: Russo
- Company Name: Profound Logic Software
- Contact:
Re: Can Atrium Launch Executable Files
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:
And the JS API for it w/this:
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.
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>
Code: Select all
<script type="text/javascript" src="/profoundui/proddata/js/runtime.js"></script>
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.
-
- Profound User
- Posts: 62
- Joined: Fri Nov 02, 2012 6:28 am
- First Name: Brett
- Last Name: Elston
- Company Name: NAC
- Phone: Lanseria
- Address 1: Johannesburg
- State / Province: Outside Canada/USA
- Country: South Africa
- Contact:
Re: Can Atrium Launch Executable Files
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
- David
- Profound Logic Staff Member
- Posts: 690
- Joined: Fri Jan 04, 2008 12:11 pm
- First Name: David
- Last Name: Russo
- Company Name: Profound Logic Software
- Contact:
Re: Can Atrium Launch Executable Files
No, I don't think there is too much difference between those 2 techniques.
Who is online
Users browsing this forum: No registered users and 1 guest