Page 1 of 1
STRPCCMD PROBLEM IN THE IPAD
Posted: Tue Jul 17, 2012 12:08 pm
by jac53
It looks like the latest release 4.0.3 is not supporting in the IPAD the following :
STRPCCMD PCCMD(''rundll32 url,FileProtocolHandler
So the user can not see the invoice images that I invoke using that command.
I need a urgent solution. The error I get is :
Unable to execute "rundll32 url,FileProtocolHandler
Re: STRPCCMD PROBLEM IN THE IPAD
Posted: Tue Jul 17, 2012 12:16 pm
by David
STRPCCMD is not at all supported on the iPad due to lack of:
1. Java. Genie's STRPCCMD processing uses a signed Java Applet to process the commands. This because the browser does not have the capability on its own to run commands on the PC. The iPad does not support Java.
2. A PC to run commands on. :-). Naturally, you cannot run Windows commands on an iPad.
We do provide a global event that you can use to capture the command string to make something different happen on the iPad, see here:
http://www.profoundlogic.com/docs/displ ... 28Genie%29
When this function is defined, Genie will pass the command string to it. The function can then do something with it, for example opening a URL in the browser. To enable this alternate processing only for iPad, you can code like this:
Code: Select all
if (pui.touchDevice) {
pui.onPCCommand = function(command) {
alert("The command string is: " + command);
}
}
Re: STRPCCMD PROBLEM IN THE IPAD
Posted: Tue Jul 17, 2012 1:35 pm
by jac53
Where should I put that function?
Re: STRPCCMD PROBLEM IN THE IPAD
Posted: Tue Jul 17, 2012 1:41 pm
by David
You can put the code in your Genie skin's "custom.js" file. Place the code outside of any function.
You should then see the command string alert when STRPCCMD is used.
Re: STRPCCMD PROBLEM IN THE IPAD
Posted: Tue Jul 17, 2012 2:09 pm
by jac53
It does not work. By the way do I need to put a ; after the second { ? See below:
if (pui.touchDevice) {
pui.onPCCommand = function(command) {
alert("The command string is: " + command);
}; <----------
}
Re: STRPCCMD PROBLEM IN THE IPAD
Posted: Tue Jul 17, 2012 2:20 pm
by David
Sorry, the problem is that the flag "pui.touchDevice" is not defined. I thought this was available to users, but apparently not.
Use this code instead, which is equivalent:
Code: Select all
if ("ontouchstart" in window) {
pui.onPCCommand = function(command) {
alert("The command string is: " + command);
}
}
I tested this just now on my iPad and it seems to work fine.
Re: STRPCCMD PROBLEM IN THE IPAD
Posted: Tue Jul 17, 2012 2:39 pm
by jac53
It does not work.
Re: STRPCCMD PROBLEM IN THE IPAD
Posted: Tue Jul 17, 2012 3:26 pm
by jac53
It worked when I put it inside function customize(). Thank you very much.
Re: STRPCCMD PROBLEM IN THE IPAD
Posted: Tue Jul 17, 2012 4:56 pm
by jac53
In the command I will have an URL .
What is the best way to launch it? Using pui.openURL( url )
Re: STRPCCMD PROBLEM IN THE IPAD
Posted: Tue Jul 17, 2012 6:38 pm
by Alex
You should be able to use window.open( url )