Page 1 of 1

Hyperlink

PostPosted: Sun Dec 20, 2020 1:05 am
by Riyaz
Hi There

Is it possible to open jiwa screens via hyperlink concept, to be opened from another exe software.

Re: Hyperlink

PostPosted: Sun Dec 20, 2020 11:06 am
by SBarnes
It depends on what specifically you are trying to do below is a link to an example that Mike provided in being able to call Jiwa from Powershell, the other option is if you can start up Jiwa from a process is you are able to specify on a given user what screens to open at startup in user maintenance.

viewtopic.php?f=27&t=167&p=432&hilit=powershell#p432

Alternatively you could try passing in command line arguments when starting Jiwa and then based upon the command line arguments have a plugin do something once Jiwa is open to get the comand line arguments in a Winforms application the following works, I would assume it should probably work in a plugin although I've never tried it.

Code: Select all
string[] args = Environment.GetCommandLineArgs();

Re: Hyperlink

PostPosted: Mon Dec 21, 2020 8:48 am
by Riyaz
Hi Stuart

Thanks for your reply, basically trying to see if we can have shortcuts to Jiwa screens from another exe, basically Jiwa is logged in and open , now from another exe can we open any screen such as create sales order , or a specific tab of debtor maintenance screen, etc basically shortcuts or bookmarks.

Re: Hyperlink  Topic is solved

PostPosted: Mon Dec 21, 2020 9:17 am
by SBarnes
You can create orders externally from another .net program you just need to reference the business logic dlls, and the main Jiwa application dll and the odbc one then login with code and create the order and fill it in and save it.

To control the user interface that's a whole different ball game, you would need to build some sort of inter-process communication mechanism such as using a socket or something like having the non Jiwa side write commands into a table and then have a plugin on a timer poll the table and execute the commands and then delete that command from the table once processed.

Re: Hyperlink

PostPosted: Mon Dec 21, 2020 12:47 pm
by Mike.Sheen
SBarnes wrote:To control the user interface that's a whole different ball game, you would need to build some sort of inter-process communication mechanism such as using a socket


Yep, this would be the way to go.

Create a custom URI Scheme in Windows (just a few registry entries) and this should launch your own custom .exe which will accept the hyperlink as a parameter, and then using Windows socket or similar send a message.

A plugin in Jiwa will establish a socket to listen on - and receive messages from the custom .exe which you could then act on.

This gets messy on RDS environments where you have multiple Jiwa.exe's running and listening on the same socket / port - you'd have to layer your own protocol within the message to include the Windows username at least and the listener discards all messages not containing that user - or something like that.

Interesting little problem - but I'd budget on a week of time to get it working right - and even then it's a bit clunky in that you need to install a custom executable and custom URI scheme registry entries on each machine running Jiwa.

Re: Hyperlink

PostPosted: Mon Dec 21, 2020 5:41 pm
by Riyaz
Thanks Mike and Stuart, that helps