Silk Mobile

Table of Contents (Homepage)

P2CX

P2CX(Percentage )

images/images/os-icons/os_ios_150x150.png

images/images/os-icons/os_android_150x150.png

images/images/os-icons/os_windows_150x150.png

images/images/os-icons/os_blackberry_150x150.png

images/images/os-icons/os_symbian02_150x150.png

images/images/os-icons/os_windows_mobile_150x150.png

Description

According to the given percentage, this command will return the active device's width pixel count (X Coordinate) as an Integer. With this command and the matching P2CY command, you can avoid relying on coordinates and to give relative size not based on resolution of device.

Parameters

  • Percentage – Given screen percentage Value will be between 0 to 100 .

Usage

Scenario: In the following example we will get the width pixels value of 80% of the screen (where the EriBank logo ends (X coordinates of 80% of the screen)

images/download/attachments/3309851/17.jpg

Parameters:

  • Percentage – will be set to 80.

Code Examples

Java Example
int int0 = client.p2cx(80);
C# Example
int int0 = client.P2cx(80);
VBScript Example
int0 = client.P2cx ( 80 )
Report
Python Example
var0 = self.client.p2cx(80)
Perl Example
my $int0 = $client->p2cx(80);