STRPCCMD PROBLEM IN THE IPAD

Use this board to ask questions or have discussions with other Genie users.
Post Reply
jac53
Experienced User
Posts: 170
Joined: Mon Jul 19, 2010 2:40 pm
First Name: Jorge
Last Name: Cabrera
Company Name: Lennar Corp
Phone: 305-229-6400
Contact:

STRPCCMD PROBLEM IN THE IPAD

Post 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
User avatar
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: STRPCCMD PROBLEM IN THE IPAD

Post 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);

  }

}

jac53
Experienced User
Posts: 170
Joined: Mon Jul 19, 2010 2:40 pm
First Name: Jorge
Last Name: Cabrera
Company Name: Lennar Corp
Phone: 305-229-6400
Contact:

Re: STRPCCMD PROBLEM IN THE IPAD

Post by jac53 »

Where should I put that function?
User avatar
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: STRPCCMD PROBLEM IN THE IPAD

Post 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.
jac53
Experienced User
Posts: 170
Joined: Mon Jul 19, 2010 2:40 pm
First Name: Jorge
Last Name: Cabrera
Company Name: Lennar Corp
Phone: 305-229-6400
Contact:

Re: STRPCCMD PROBLEM IN THE IPAD

Post 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);

}; <----------
}
User avatar
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: STRPCCMD PROBLEM IN THE IPAD

Post 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.
jac53
Experienced User
Posts: 170
Joined: Mon Jul 19, 2010 2:40 pm
First Name: Jorge
Last Name: Cabrera
Company Name: Lennar Corp
Phone: 305-229-6400
Contact:

Re: STRPCCMD PROBLEM IN THE IPAD

Post by jac53 »

It does not work.
jac53
Experienced User
Posts: 170
Joined: Mon Jul 19, 2010 2:40 pm
First Name: Jorge
Last Name: Cabrera
Company Name: Lennar Corp
Phone: 305-229-6400
Contact:

Re: STRPCCMD PROBLEM IN THE IPAD

Post by jac53 »

It worked when I put it inside function customize(). Thank you very much.
jac53
Experienced User
Posts: 170
Joined: Mon Jul 19, 2010 2:40 pm
First Name: Jorge
Last Name: Cabrera
Company Name: Lennar Corp
Phone: 305-229-6400
Contact:

Re: STRPCCMD PROBLEM IN THE IPAD

Post by jac53 »

In the command I will have an URL .
What is the best way to launch it? Using pui.openURL( url )
User avatar
Alex
Profound Logic Staff Member
Posts: 233
Joined: Fri Jan 04, 2008 12:10 pm
First Name: Alex
Last Name: Roytman
Company Name: Profound Logic Software
Contact:

Re: STRPCCMD PROBLEM IN THE IPAD

Post by Alex »

You should be able to use window.open( url )
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests