Genie Macro from Javascript
-
- Experienced User
- Posts: 119
- Joined: Wed May 25, 2016 11:58 am
- First Name: Patti
- Last Name: Shuey
- Company Name: Conestoga Wood Specialties
- Phone: 7174452886
- Address 1: 645 Reading Road
- City: East Earl
- State / Province: Pennsylvania
- Zip / Postal Code: 17519
- Country: United States
- Contact:
Genie Macro from Javascript
I have an RPG program that I am converting the screen to a rich display. The program is a grid that the users can select actions on the row like work with spool files, work with job, etc. via qcmdexc calls. I have these commands set up as genie macros that can be called from Atrium, but can they be called from and RPG program or javascript on the screen within Atrium? Or is there another, easier way to do this?
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Genie Macro from Javascript
If you create an XML-based macro, you can launch it from the URL.
https://docs.profoundlogic.com/display/PUI/Macros
https://docs.profoundlogic.com/display/PUI/Macros
-
- Experienced User
- Posts: 119
- Joined: Wed May 25, 2016 11:58 am
- First Name: Patti
- Last Name: Shuey
- Company Name: Conestoga Wood Specialties
- Phone: 7174452886
- Address 1: 645 Reading Road
- City: East Earl
- State / Province: Pennsylvania
- Zip / Postal Code: 17519
- Country: United States
- Contact:
Re: Genie Macro from Javascript
I got this to work, but is there a way to have it open in a new Atrium tab instead of a new browser tab?
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Genie Macro from Javascript
It's not clear how you are launching the URL. If its from an Atrium item, you could configure it like this:
-
- Experienced User
- Posts: 119
- Joined: Wed May 25, 2016 11:58 am
- First Name: Patti
- Last Name: Shuey
- Company Name: Conestoga Wood Specialties
- Phone: 7174452886
- Address 1: 645 Reading Road
- City: East Earl
- State / Province: Pennsylvania
- Zip / Postal Code: 17519
- Country: United States
- Contact:
Re: Genie Macro from Javascript
I need to launch it from a program. It is actually a drop down selection from a grid. To test it, I put a button on my screen with the following in the onclick property:
window.open("http://10.10.2.4:8082/profoundui/auth/g ... ue1=WRKMSG");
Please note this genie macro was just for me to test the theory. I will have to build the parameters for the macro on the fly in my "real" program.
This works great, but it opens in a new browser window. I'd like to keep it in the atrium window as a new tab.
window.open("http://10.10.2.4:8082/profoundui/auth/g ... ue1=WRKMSG");
Please note this genie macro was just for me to test the theory. I will have to build the parameters for the macro on the fly in my "real" program.
This works great, but it opens in a new browser window. I'd like to keep it in the atrium window as a new tab.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Genie Macro from Javascript
Thanks for the clarification.
window.open() will open a new browser window or tab -- that's what it does.
In order to open an Atrium tab, remove the window.open() and use Atrium.launchURL() instead.
https://docs.profoundlogic.com/pages/vi ... Id=7864719
window.open() will open a new browser window or tab -- that's what it does.
In order to open an Atrium tab, remove the window.open() and use Atrium.launchURL() instead.
https://docs.profoundlogic.com/pages/vi ... Id=7864719
-
- Experienced User
- Posts: 119
- Joined: Wed May 25, 2016 11:58 am
- First Name: Patti
- Last Name: Shuey
- Company Name: Conestoga Wood Specialties
- Phone: 7174452886
- Address 1: 645 Reading Road
- City: East Earl
- State / Province: Pennsylvania
- Zip / Postal Code: 17519
- Country: United States
- Contact:
Re: Genie Macro from Javascript
Thanks so much Scott! This is working great!
Who is online
Users browsing this forum: Bing [Bot] and 2 guests