Page 1 of 1

IPAD & STRPCCMD

Posted: Fri Oct 25, 2013 12:19 pm
by jac53
Is there a way to simulate STRPCCMD(''rundll32 url,FileProtocolHandler in the IPAD?

Thx

Re: IPAD & STRPCCMD

Posted: Fri Oct 25, 2013 12:43 pm
by Scott Klement
That would depend on what you're using the FileProtocolHandler API for.

FileProtocolHandler is a Windows API that performs a wide variety of tasks related to opening programs. Since this is a Windows API, the exact same function is not available outside of the Windows environment. However, depending on what you're using this for, it may be possible to do the same thing on iPad.

For example, if you wanted to use this to open a URL, this can be done very easily from Genie since Genie runs in a web browser (vs. a 5250 terminal like client access where you'd need to use something weird like STRPCCMD)

Can you explain how you're using FileProtocolHandler?

Re: IPAD & STRPCCMD

Posted: Fri Oct 25, 2013 2:12 pm
by jac53
Hi Scott:

I am using it to display documents which reside in a server via intranet like this:

http://Imaging.lennar.com/IBPMExpress/E ... .aspx?Tool
Name=PAWSER&SearchName=XXXX .....

Thx

Re: IPAD & STRPCCMD

Posted: Fri Oct 25, 2013 2:37 pm
by Scott Klement
For a web URL like that, it should be no problem to do it in Genie directly. You only need to use something like STRPCCMD if you want it to work outside of a browser (like, in Client Access.)

In Genie, just drag a button, image, hyperlink or similar, and set the 'onclick' property:

Code: Select all

window.open("http://imaging.lennar.com/IBPMExpress/External/DocumentActionProcessor.aspx?ToolName=PAWSER&SearchName=XXXX", "_blank");
If parts of that URL are needed from other fields on the screen, then you can use the get() API to get them. So you could do something like:

Code: Select all

window.open("http://imaging.lennar.com/IBPMExpress/External/DocumentActionProcessor.aspx?ToolName=PAWSER&SearchName=" + encodeURIComponent(get("D_29_15")), "_blank");
encodeURIComponent will 'escape' any special characters in the field so that they are valid in a URL, and get() will get the contents of a field on the screen (such as D_29_15).

Since this is a Genie 5250 session, you really need the data to be on the screen in order to get it into your URL (though, it could be a hidden field.)

The same technique would also work in a Profound UI Rich Display File, too.

Re: IPAD & STRPCCMD

Posted: Fri Oct 25, 2013 3:37 pm
by jac53
This is subfile application which you position the cursor on the row and hit F17, the URL is created on the fly and execute the STRPCCMD with the created URL.
In Genie we added a image with the following properties:

onclick setCursor("I_12_1"); pressKey("F17")
setCursor("I_14_1"); pressKey("F17")
.
up to
setCursor("I_23_1"); pressKey("F17")

some of the images are hidden thanks to a javascript to match what happens in the green screen. In the PC works perfect.
If I modify the onclick property using a hidden field and window.open,
Will it work for both, PC and IPAD?