var Result:String;
//---New Input format: Input(1):Visible:Password:Default:Length:Align:PickList:SendCaption:Color:TextColor:Disabled:ReadOnly:DigitsOnly
Result := Input('Hello', 'Nom, ListType,DisgitType, DateType,TimeType,LocationType,SwitchType,CheckBoxType', 60000,
'1::::left::Continue:::0:0:0' +','+
'1::::left:1;2;3;4;5;6;7;8;9:Continue:::0:0:0' +','+
'1::12345::left::Continue:::0:0:1' +','+
'1::::left:DateType:Continue:::0:0:0' +','+
'1::::left:TimeType:Continue:::0:0:0' +','+
'1::::left:LocationType:Continue:::0:0:0' +','+
'1::::left:SwitchType:Continue:::0:0:0' +','+
'1::::left:CheckBoxType:Continue:::0:0:0',
'',
',',
'*'
':'
); //---Header, FieldNames, FieldValues, ImageID, Seperator, ReturnValuesSeperator, PropertiessSeperator : String
VAR Result : String;
VAR Link : String;
Link := 'http://217.16.4.142:82/Tracking/Position/Device?NameID='+CRM_CustomerCode;
Result := PHP_GET(Link,0);
VAR Result : String;
VAR Params : String;
VAR Link : String;
Params := 'ProdID=0&'+
'StartDateTime=&'+
'StopDateTime=&'+
'MaxRecordID=0&'+
'MinRecordID=0&'+
'Type=2';
Link := 'http://api.furthermarket.com/FM/MARKET/Sales1?MyAccountID=4481642&Password=s';
Result := HTTP_POST(Link, Params, 'application/x-www-form-urlencoded:utf-8', '', 0); // Headers=ContentType:CharSet:Accept
//Result := PHP_POST(Link, Params, 0);
VAR Result : String;
VAR Jour : String;
VAR Heure : String;
VAR Tampon : String;
VAR i,j: Integer;
IF 1=1225 THEN
(
FOR i:=0 TO PREd(5) DO
(
ShowMessage(IntToStr(i));
)
)
ELSE
(
IF 1=11 THEN
(
Result := Now + lineBreak + Now;;
)
ELSE
(
Result := Now;
IF 1=1 THEN
(
Result := Now + lineBreak + NowDate;
FOR i:=0 TO Pred(3) DO
(
IF 11=11 THEN ShowMessage(IntToStr(i));
IF 1=1 THEN ShowMessage('i='+IntToStr(i));
j := 0;
WHILE(1=1) DO
(
j := 1 + j;
IF 1=1 THEN ShowMessage('j='+IntToStr(j));
IF j=2 THEN Break;
)
)
)
ELSE
(
Result := Now;
)
)
);
VAR Result : String;
Result := MenuItemAdd('MyMenu','1. Yaounde', 'Yaounde', '1', '', '', '', '', '', '', '');
Result := MenuItemAdd('MyMenu','2. Douala', 'Douala', '2', '', '', '', '', '', '', '');
Result := MenuItemAdd('MyMenu','3. Bafoussam', 'Bafoussam', '3', '', '', '', '', '', '', '');
Result := MenuItemAdd('MyMenu','4. Bamenda', 'Bamenda', '4', '', '', '', '', '', '', '');
Result := MenuItemAdd('MyMenu','5. Buea', 'Buea', '5', '', '', '', '', '', '', '');
Result := MenuItemAdd('MyMenu','6. Garoua', 'Garoua', '6', '', '', '', '', '', '', '');
Result := MenuItemAdd('MyMenu','7. Ngaoundéré', 'Ngaoundéré', '7', '', '', '', '', '', '', '');
Result := MenuItemAdd('MyMenu','8. Maroua', 'Maroua', '8', '', '', '', '', '', '', '');
Result := MenuItemAdd('MyMenu','9. Bertoua', 'Bertoua', '9', '', '', '', '', '', '', '');
Result := MenuItemAdd('MyMenu','10. Ebolowa', 'Ebolowa', '10', '', '', '', '', '', '', '');
//MenuItemAdd(|MenuName : String; RawText : String; Text : String; SelectID : String; Hint : String; Color : String; Blink : String; Height : String; TextAlign : String; ImageNEngAndClick : String = ''; Others : String = '')
//---Others //---NotifyAlertCount:MultiSelect:IconType(0=default,N=themeN):Transperency(0-0.5,1)
//---ImageNEngAndClick //---ItemID:ItemType:ImageID:Gender:ClickTerminalLink:ThumbSize //(ItemType=1,2,3=photos; ItemType=4,7,8,9,10=WebLink,Contact,Group,Applet Icons,Barcode)
//---Height //---Left:Top:Right:Buttom:Height:BorderRadiusLeftTop:BorderRadiusTopRight:BorderRadiusButtomLeft:BorderRadiusButtomRight
//---Color //---Border Color:FillColor:TexColor
//---Hint //---HintText:TextColor:BackColor:Blink:PopTerminalLink
//---SelectID //---New response format: Response:Visible:Session:MultiSelect:PopTerminalLink
//---Result := InputMenu(MenuName : String, Timeout : Integer (in ms), Options : String (Max:Min:Separator:Caption:Color:Blink), SearchMode : String (Search PlaceHolder), HideSystemGoback : Integer = 0, DeepCatching : Integer = 1, Options : String = '');
Result := InputMenu('MyMenu', 60000, '', '');
VAR Count : Integer;
ArrayItemAdd('tablo', 'Elt1');
ArrayItemAdd('tablo', 'Elt2');
ArrayItemAdd('tablo', 'Elt3');
ArrayItemAdd('tablo', 'Elt4');
Count := ArrayItemsCount('tablo');
VAR Result : String;
ArrayItemAdd('MyArray', 'Item1');
ArrayItemAdd('MyArray', 'Item2');
ArrayItemAdd('MyArray', 'Item3');
ArrayItemAdd('MyArray', 'Item4');
ArrayItemAdd('MyArray', 'Item5');
Result := ArrayToStr('MyArray', '*');
VAR Result : String;
VAR i : Integer;
Result := 'Hihi';
FOR i:=0 TO PRED(15) DO
(
ShowMessage(IntToStr(i));
);
VAR Result : String;
VAR Result2 : String;
ArrayInsertValue('Authorised', 0, '677440031');
ArrayInsertValue('Authorised', 1, '681648926');
ArrayInsertValue('Authorised', 2, '675717538');
ArrayInsertValue('Authorised', 3, '1234567890');
IF ArrayIndexOf('Authorised', USER_PhoneNumber ) <> '-1' THEN
(
Result:=CRM_Select('Query1', '8', 'COUNT(*) AS Total','', '',1);
Result2 := Query_FieldValue('Query1', 'Total');
Result :=Result2+' IMEIs registered';
Exit;
)
ELSE
(
Result := 'Unauthorized ACCESS ' + USER_Name;
Exit;
);
VAR Result : String;
VAR Countries : String;
VAR i, Count : Integer;
Countries := GetCountriesList; //Return Countries seperated by ,
Countries := StringReplace(Countries,',',';'); //---Replace , by ; for input picklist
//StrToArray(|(String(ArrayName), String(StringName), String(Delimiter)))
Result := StrToArray('CountriesArray', Countries, ';');
//Input(|String (Header), String(Multiple request), Integer(Timeout in ms), String(FieldsOptions=Visible:Password:Default:Length:Align:PickList(Seperator=;):SendCaption:Color:TextColor))
Result := Input('Select Country', 'Country', 5000, '1::Cameroon::center:'+Result+':Finish::');
Result := ArrayGetValue('CountriesArray', StrToInt(Result));
ShowMessage('You Selected : ' + Result);
VAR Result : String;
//---CreditGetMyBalance(|Currency : String, CreditType : Integer(0=Principal,1=sms,2=calls,3=Inquiries,4=Votes,5=Card));
//---CreditGetUserBalance(|Currency : String, CreditType : Integer(0=Principal,1=sms,2=calls,3=Inquiries,4=Votes,5=Card));
//---Current Account Balance
Result := CreditGetMyBalance('XAF', 0);
//---Active visitor Balance
//Result := CreditGetUserBalance('XAF', 0);
VAR Result : String;
Result := MenuItemAdd('MyMenu','My Basic Menu', 'My Basic Menu', '', '', '', '', '', '');
Result := MenuItemAdd('MyMenu','LINEBREAK', '', '', '', '', '', '', '');
Result := MenuItemAdd('MyMenu','1. AAA', 'AAA', '1', '', '', '', '', ' ');
Result := MenuItemAdd('MyMenu','2. BBB', 'BBB', '2', '', '', '', '', ' ');
Result := MenuItemAdd('MyMenu','3. CCC', 'CCC', '3', '', '', '', '', ' ');
Result := MenuItemAdd('MyMenu','4. DDD', 'DDD', '4', '', '', '', '', ' ');
Result := MenuItemAdd('MyMenu','5. EEE', 'EEE', '5', '', '', '', '', ' ');
//---MenuItemAdd(|MenuName : String; RawText : String; Text : String; SelectID : String; Hint : String; Color : String; Blink : String; Height : String; TextAlign : String)
//---SelectID format: Response:Visible:Session:MultiSelect:PopTerminalLink
//---Height format: MarginLeft:MarginTop:MarginRight:MarginButtom:Height
//---Color format: BorderColor:InnerColor Exple: $FF249B38:$FF249B40
//---TextAlign: Exple: left or center or right
Result := InputMenu('MyMenu', 2500);
//---InputMenu(MenuName : String, Timeout : Integer (in ms), MinMaxSelect : String (Max:Min:Separator:Caption:Color:Blink));
//---Result : 1 Seperator 2 Seperator 3...
VAR Result : String;
Result := UserIDsFromPhone('677440031'); //Return String UserID:AccountID:Name:LanguageID:UserGender:EMail)
Result := StringReplace(Result,':',LINEBREAK);
ShowMessage(Result);
VAR Result : String;
VAR Countries : String;
VAR i, Count : Integer;
Countries := GetCountriesList; //Return Countries seperated by ,
Countries := StringReplace(Countries,',',';'); //---Replace , by ; for input picklist
//StrToArray(|(String(ArrayName), String(StringName), String(Delimiter)))
Result := StrToArray('CountriesArray', Countries, ';');
//Input(|String (Header), String(Multiple request), Integer(Timeout in ms), String(FieldsOptions=Visible:Password:Default:Length:Align:PickList(Seperator=;):SendCaption:Color:TextColor))
Result := Input('Select Country', 'Country', 5000, '1::Cameroon::center:'+Result+':Finish::');
Result := ArrayGetValue('CountriesArray', StrToInt(Result));
ShowMessage('You Selected : ' + Result);
VAR Result : String;
VAR GotoUssdCode : String;
//---IF at the end of your code "GotoUssdCode" is assign with a ussd link, execution will switch to that link
GotoUssdCode := '*fm*2*8#';
VAR Result : String;
Result := CreditChargeUser(50, 'XAF', 0); // : Return String (1=Success)
IF Result = '1' THEN
(
ShowMessage('You where successfully charged');
)
ELSE
(
ShowMessage('Charge failed');
)
VAR Result : String;
Result := MessageBox('HIHIHI', 'I know you want me..', 1,1,1); // Resturn String
IF Result = '1' THEN ShowMessage('You Clicked "Yes"');
IF Result = '2' THEN ShowMessage('You Clicked "No"');
IF Result = '3' THEN ShowMessage('You Clicked "Cancel"');
IF USER_Connection_GUI='0' THEN
(
Shomessage('Mobile operator ussd connection "Native ussd"');
)
IF USER_Connection_GUI='1' THEN
(
Shomessage('PC aap, Web terminal, Mobile app terminal connection "Virtual ussd"');
)
VAR i, j : Integer;
VAR Result : String;
VAR Name : String;
VAR SingleUser : String;
VAR UserID : String;
VAR ImageID : String;
VAR Gender : String;
Result := GetUserRelations; //Return Array of String (UserID:AccountID:Name:LanguageID:UserGender:EMail:Phone:ImageIDUser:ImageIDAccount)
IF Copy(Result,1,1) = '0' THEN
(
ShowMessage(Result);
Exit;
);
StrToArray('Relations', Result, '*');
ShowMessage('Total = ' + IntToStr(ArrayItemsCount('Relations')));
FOR i:=0 TO PRED(ArrayItemsCount('Relations')) DO
(
StrToArray('SingleUser', ArrayGetValue('Relations', i), ':');
Name := ArrayGetValue('SingleUser', 2);
UserID := ArrayGetValue('SingleUser', 0);
ImageID := ArrayGetValue('SingleUser', 7);
Gender := ArrayGetValue('SingleUser', 4);
//ImageNEngAndClick : String (ItemID:ItemType:ImageID:Gender:ClickTerminalLink)
MenuItemAdd('List', IntToStr(i) +') '+ Name, Name, IntToStr(i), '', '', '', '', '', UserID+':'+'2'+':'+ImageID+':'+Gender+':*fm*21#');
);
InputMenu('List', 5000);
VAR Result : String;
Result:=MyCash_Select('Query1', '', '*','', 'NEng DESC',22);
VAR Result : String;
VAR Lat : String;
VAR Long : String;
Lat := '5.48077166666667';
Long := '10.4197233333333';
Result := MenuItemAddGoogleMapPoint('MyMenu', Lat, Long, 'FM Every Where', '16', '');
Result := MenuItemAddGoogleMapPoint('MyMenu', Lat, Long, 'FM Every Where1', '16', '');
Result := MenuItemAddGoogleMapPoint('MyMenu', Lat, Long, 'FM Every Where2', '16', '');
//MenuItemAdd(|MenuName : String; RawText : String; Text : String; SelectID : String; Hint : String; Color : String; Blink : String; Height : String; TextAlign : String)
Result := InputMenu('MyMenu', 2500);
VAR Result : String;
Result := PublishActivityDirect('TO GOD BE THE GLORY GREAT THINGS HE HAS DONE');
//ShowMessage(Result);
//MenuItemAddActivity('MyMenu'; 'HIHIHI', Result, '');
MenuItemAddActivity('MyMenu', 'Header Text', StrToInt(Result), 4);
MenuItemAddActivity('MyMenu', 'Header Text', StrToInt(Result), 3);
MenuItemAddActivity('MyMenu', 'Header Text', StrToInt(Result), 2);
MenuItemAddActivity('MyMenu', 'Header Text', StrToInt(Result), 1);
//ShowMessage(Result);
Result := InputMenu('MyMenu', 2500);
VAR Result : String;
VAR ValueStr : String;
VAR i, Count : Integer;
ValueStr := GetUserGeoLocation; //Return String (Latitude:Longitude))//Return Array of String (ItemType1:ImageID1*ItemType2:ImageID2*ItemType3:ImageID3...)
//ShowMessage(ValueStr);
IF LeftStr(ValueStr, 1) = '0' THEN
(
ShowMessage('Invalid');
Exit;
);
ValueStr := StrToArray('MediasList', ValueStr, '*');
Result := ValueStr;
Exit;
Count := ArrayItemsCount('MediasList');
FOR i:=0 TO PRED(Count) DO
(
//Result := MenuItemAdd('MyMenu','1. Yaounde', 'Yaounde', '1', '', '', '', '', ' ');
ValueStr := StrToArray('MediaItem', ArrayGetValue('MediasList', i), ':');
Result := MenuItemAddSharedMedia('MyMenu', 'RawText', USER_AccountID, USER_UserID, ArrayGetValue('MediaItem', 1), ArrayGetValue('MediaItem', 0), 4);
);
Result := InputMenu('MyMenu', 2500);
VAR Result : String;
VAR XCoordinates, YCoordinates : String;
XCoordinates := 'Borel:Christian:Tresor:FM';
YCoordinates := '11:22:70:100';
// Change type to "column", "bar", "area", "spline", "pie",etc.
MenuItemAddChart('MyMenu',
'FM Developpers',
'column',
'theme2',
XCoordinates,
YCoordinates,
1,
'11:11:11:11:400'
);
MenuItemAddChart('MyMenu',
'FM Developpers',
'pie',
'theme1',
XCoordinates,
YCoordinates,
1,
'11:11:11:11:400'
);
MenuItemAddChart('MyMenu',
'FM Developpers',
'area',
'theme2',
XCoordinates,
YCoordinates,
1,
'11:11:11:11:400'
);
MenuItemAddChart('MyMenu',
'FM Developpers',
'spline',
'theme2',
XCoordinates,
YCoordinates,
1,
'11:11:11:11:400'
);
Result := InputMenu('MyMenu', 2500);
VAR Result : String;
//---New response format: Response:Visible:Session:MultiSelect:PopTerminalLink
Result := MenuItemAdd('MyMenu','1. Yaounde', 'Yaounde', '1:1:0:1:', '', '', '', '', ' ');
Result := MenuItemAdd('MyMenu','1. Yaounde', 'Yaounde', '1:1:0:1:', '2::$FFEB371A:1', '', '', '', ' ');
Result := MenuItemAdd('MyMenu','2. Douala', 'Douala', '2', '3::$FF05A80B:1', '', '', '', ' ');
Result := MenuItemAdd('MyMenu','3. Bafoussam', 'Bafoussam', '3', '4:::0', '', '', '', ' ');
Result := MenuItemAdd('MyMenu','2. Douala', 'Douala', '2', '3::$FF05A80B:1', '', '', '', ' ');
Result := MenuItemAdd('MyMenu','2. Douala', 'Douala', '2', '3::$FF05A80B:1', '', '', '', ' ');
Result := MenuItemAdd('MyMenu','1. Yaounde', 'Yaounde', '1', '2::$FFEB371A:1', '', '', '', ' ');
Result := MenuItemAdd('MyMenu','2. Douala', 'Douala', '2', '3::$FF05A80B:1', '', '', '', ' ');
Result := MenuItemAdd('MyMenu','1. Yaounde', 'Yaounde', '1', '2::$FFEB371A:1', '', '', '', ' ');
Result := MenuItemAdd('MyMenu','1. Yaounde', 'Yaounde', '1:1:0:1:', '2::$FFEB371A:1', '', '', '', ' ');
Result := MenuItemAddBackGroundImage('MyMenu', '18');
//MenuItemAdd(|MenuName : String; RawText : String; Text : String; SelectID : String; Hint : String; Color : String; Blink : String; Height : String; TextAlign : String)
Result := InputMenu('MyMenu', 2500);
VAR Result : String;
Result := MessengerBox_Call('MyMenu', 'Talk with us', '1', ''); //Return String, 1=success
Result := InputMenu('MyMenu', 2500);
VAR Result : String;
Result := SessionEntryCode;
VAR Result : String;
VAR MediasIDs : String;
VAR i, Count : Integer;
MySharedMedias_Select('Medias', '', 'NEng', '', 'NEng DESC', 25, '');
Count := Query_RecordsCount('Medias'); // Return Integer
MediasIDs := '0';
Query_First('Medias');
FOR i:=0 TO PRED(Count) DO
(
MediasIDs := MediasIDs + ',' + Query_FieldValue('Medias', 'NEng');
//ShowMessage(MediaIDs);
Query_Next('Medias');
);
//ShowMessage(MediasIDs);
Result := Medias_Galery('Galery', MediasIDs); //Return String, 1=success
InputMenu('Galery', 5000);
VAR Result : String;
Result := Place_External_Payment_Request(2374, 25, '237677440031', 'School Fees', 'For matricule 12345', 'XAF'); // Return 1:PaymentID for successfull palced or 0:Error message
var result : string;
result := MTNUsbscribeProduct('2370110003903',
'Huawei123',
'237677440031',
'23701220000011074',
'0',
'', //operCode,
'2', //channelID,
'0' //Test bed
); //Return String (Status:::Result:::Description)
VAR Result : String;
VAR IDs : String;
VAR i, Count : Integer;
IDs := '';
for i:=1 to 100 do
(
IF IDs <> '' THEN ( IDs := IDs + ',' + IntToStr(i); )
ELSE ( IDs := IntToStr(i); );
);
Result := MenuItemAddContacts('Contacts', 'Contacts', IDs, '1'); //---Resturn String
Result := MenuItemAddContacts('Contacts', 'Contacts', IDs, '2'); //---Resturn String
Result := InputMenu('Contacts', 5000);
VAR Result :String;
VAR El1 :String;
VAR El2 :String;
Result := JSONItemBuild('JSONName', 'ItemCaption', 'Bills');
Result := JSONItemBuild('JSONName', 'ItemImageID', '15864');
Result := JSONItemBuild('JSONName', 'ItemAccountID', '9');
Result := JSONItemBuild('JSONName', 'ItemIconType', '2');
El1 := JSONItemBuild('JSONName', 'ItemTerminalLink', '*141*5#');
JSONItemClear('JSONName');
Result := JSONItemBuild('JSONName', 'ItemCaption', 'Scanner');
Result := JSONItemBuild('JSONName', 'ItemImageID', '18020');
Result := JSONItemBuild('JSONName', 'ItemAccountID', '9');
Result := JSONItemBuild('JSONName', 'ItemIconType', '2');
El2 := JSONItemBuild('JSONName', 'ItemTerminalLink', '*fm*2*1111#');
Result := '['+El1+ ', '+El2+']';
ExternalFunction('37424', 'GENERAL ALERT MESSAGE WITH JSON OPTIONS***1***'+Result ); //----------Successful Insertion
Exit;
VAR Result : String;
VAR FieldID1 : String;
VAR FieldID2 : String;
VAR Options : String;
VAR Js : String;
//---InputFieldAdd(InputName, FieldName, Visible, Password, DefaultValue, Length, Align, PickList, Data, Color, TextColor, Disabled, ReadOnly, DigitsOnly : String);
FieldID1 := InputFieldAdd('InputName', 'Text 1', '1', '0', '', '', '', '', '', '', '', '0', '0', '0');
FieldID2 := InputFieldAdd('InputName', 'Text 2', '1', '0', '', '', '', '', '', '', '', '0', '0', '0');
Js := '';
Options := JSONItemBuild('JSONName', 'Js', Js , '1');
Result := Input2('InputName', 'Real Advanced - JS-INPUT', 'SumitButton', '+*-*+', '', '60000',Options);
var Result:String;
ShowMessage('Begin');
//---InputFieldAdd(InputName, FieldName, Visible, Password, DefaultValue, Length, Align, PickList, Data, Color, TextColor, Disabled, ReadOnly, DigitsOnly : String);
Result := InputFieldAdd('InputName', 'Nom', '1', '0', 'Sangoku', '', '', '', '', '', '', '0', '0', '0');
Result := InputFieldAdd('InputName', 'ListType', '1', '0', '', '', '', '1;2;3;4;5;6;7;8;9', '', '', '', '0', '0', '0');
//Result := InputFieldAdd('InputName', 'ListType', '1', '0', '', '', '', '1;2;3;4;5;6;7;8;9', '', '', '', '0', '0', '0');
Result := Input2('InputName', 'Real Advanced', 'SumitButton', '+*-*+', '', '60000');
VAR Result : String;
VAR Categories: String;
VAR Options, Clicks : String;
VAR Texts : String;
VAR Images : String;
VAR ExternalReturnedValue : String;
VAR Tmp : String;
//------- Initialisation des Variables de session
//---Image 1----------------------------
Result := JSONItemBuild('Image1', 'ItemID', '1030885');
Result := JSONItemBuild('Image1', 'ImageID', '20');
Result := JSONItemBuild('Image1', 'ImageType', '1');
Result := JSONItemBuild('Image1', 'MediaType', '0');
Result := JSONItemBuild('Image1', 'ThumbSize', '2');
Result := JSONItemBuild('Image1', 'ItemText', 'Image1|Remove');
Result := JSONItemBuild('Image1', 'ItemLink', '*141*5*1#');
Result := JSONItemBuild('Images', 'Image1', Result);
//---Image 2--------------------------
Result := JSONItemBuild('Image2', 'ItemID', '1030885');
Result := JSONItemBuild('Image2', 'ImageID', '19');
Result := JSONItemBuild('Image2', 'ImageType', '1');
Result := JSONItemBuild('Image2', 'MediaType', '0');
Result := JSONItemBuild('Image2', 'ThumbSize', '2');
Result := JSONItemBuild('Image2', 'ItemText', 'Image2|Remove');
Result := JSONItemBuild('Image2', 'ItemLink', '*141*5*1#');
Result := JSONItemBuild('Images', 'Image2', Result);
//---Image 3--------------------------
Result := JSONItemBuild('Image3', 'ItemID', '1030885');
Result := JSONItemBuild('Image3', 'ImageID', '18');
Result := JSONItemBuild('Image3', 'ImageType', '1');
Result := JSONItemBuild('Image3', 'MediaType', '0');
Result := JSONItemBuild('Image3', 'ThumbSize', '2');
Result := JSONItemBuild('Image3', 'ItemText', 'Image3|Remove');
Result := JSONItemBuild('Image3', 'ItemLink', '*141*5*1#');
Result := JSONItemBuild('Images', 'Image3', Result);
Images := Result;
Options := Result;
Result := MenuItemAddMedias('MyMenu', Options, '3:3:3:3:200');
Result := JSONItemBuild('Texts', 'Header', 'Object Header');
Result := JSONItemBuild('Texts', 'Body', 'Object Body');
Texts := Result;
Result := JSONItemBuild('Object', 'Images', Images);
Result := JSONItemBuild('Object', 'Texts', Texts);
Options := Result;
//---Clicks--------------------------
//---Click : Terminal link topup
JSONItemClear('Click');
JSONItemClear('Clicks');
Result := JSONItemBuild('Click', 'ItemID', '*fm*5*1#');
Result := JSONItemBuild('Click', 'ItemIDSub', '');
Result := JSONItemBuild('Click', 'SystemClickID', '0');
Result := JSONItemBuild('Click', 'ClickBlock', 'HeaderBlock,BodyBlock');
Result := JSONItemBuild('Click', 'Description', 'Terminal link topup');
Result := JSONItemBuild('Clicks', 'Click', Result);
Clicks := Result;
Result := MenuItemAddRichMedias('MyMenu', Options, Clicks, '', '3:3:3:3:80');
//---Click : User Page small
JSONItemClear('Click');
JSONItemClear('Clicks');
Result := JSONItemBuild('Click', 'ItemID', '1');
Result := JSONItemBuild('Click', 'ItemIDSub', '');
Result := JSONItemBuild('Click', 'SystemClickID', '1');
Result := JSONItemBuild('Click', 'ClickBlock', 'HeaderBlock,BodyBlock');
Result := JSONItemBuild('Click', 'Description', 'User Page small');
Result := JSONItemBuild('Clicks', 'Click', Result);
Clicks := Result;
Result := MenuItemAddRichMedias('MyMenu', Options, Clicks, '', '3:3:3:3:80');
//---Click : User Page Big
JSONItemClear('Click');
JSONItemClear('Clicks');
Result := JSONItemBuild('Click', 'ItemID', '2');
Result := JSONItemBuild('Click', 'ItemIDSub', '');
Result := JSONItemBuild('Click', 'SystemClickID', '2');
Result := JSONItemBuild('Click', 'ClickBlock', 'HeaderBlock,BodyBlock');
Result := JSONItemBuild('Click', 'Description', 'User Page Big');
Result := JSONItemBuild('Clicks', 'Click', Result);
Clicks := Result;
Result := MenuItemAddRichMedias('MyMenu', Options, Clicks, '', '3:3:3:3:80');
//---Click : User Chat Box
JSONItemClear('Click');
JSONItemClear('Clicks');
Result := JSONItemBuild('Click', 'ItemID', '9');
Result := JSONItemBuild('Click', 'ItemIDSub', '');
Result := JSONItemBuild('Click', 'SystemClickID', '3');
Result := JSONItemBuild('Click', 'ClickBlock', 'HeaderBlock,BodyBlock');
Result := JSONItemBuild('Click', 'Description', 'User Chat Box');
Result := JSONItemBuild('Clicks', 'Click', Result);
Clicks := Result;
Result := MenuItemAddRichMedias('MyMenu', Options, Clicks, '', '3:3:3:3:80');
//---Click : User Chat Group Box
JSONItemClear('Click');
JSONItemClear('Clicks');
Result := JSONItemBuild('Click', 'ItemID', '192');
Result := JSONItemBuild('Click', 'ItemIDSub', '');
Result := JSONItemBuild('Click', 'SystemClickID', '4');
Result := JSONItemBuild('Click', 'ClickBlock', 'HeaderBlock,BodyBlock');
Result := JSONItemBuild('Click', 'Description', 'User Chat Group Box');
Result := JSONItemBuild('Clicks', 'Click', Result);
Clicks := Result;
Result := MenuItemAddRichMedias('MyMenu', Options, Clicks, '', '3:3:3:3:80');
//---Click : Activity
JSONItemClear('Click');
JSONItemClear('Clicks');
Result := JSONItemBuild('Click', 'ItemID', '535216');
Result := JSONItemBuild('Click', 'ItemIDSub', '');
Result := JSONItemBuild('Click', 'SystemClickID', '5');
Result := JSONItemBuild('Click', 'ClickBlock', 'HeaderBlock,BodyBlock');
Result := JSONItemBuild('Click', 'Description', 'Activity');
Result := JSONItemBuild('Clicks', 'Click', Result);
Clicks := Result;
//Showmessage(Options);
Result := MenuItemAddRichMedias('MyMenu', Options, Clicks, '', '3:3:3:3:80');
//---Click : Applet
JSONItemClear('Click');
JSONItemClear('Clicks');
Result := JSONItemBuild('Click', 'ItemID', '198');
Result := JSONItemBuild('Click', 'ItemIDSub', '');
Result := JSONItemBuild('Click', 'SystemClickID', '6');
Result := JSONItemBuild('Click', 'ClickBlock', 'HeaderBlock,BodyBlock');
Result := JSONItemBuild('Click', 'Description', 'Applet');
Result := JSONItemBuild('Clicks', 'Click', Result);
Clicks := Result;
//Showmessage(Options);
Result := MenuItemAddRichMedias('MyMenu', Options, Clicks, '', '3:3:3:3:80');
//---Click : Business Accounts
JSONItemClear('Click');
JSONItemClear('Clicks');
Result := JSONItemBuild('Click', 'ItemID', '0');
Result := JSONItemBuild('Click', 'ItemIDSub', '');
Result := JSONItemBuild('Click', 'SystemClickID', '7');
Result := JSONItemBuild('Click', 'ClickBlock', 'HeaderBlock,BodyBlock');
Result := JSONItemBuild('Click', 'Description', 'Business Accounts');
Result := JSONItemBuild('Clicks', 'Click', Result);
Clicks := Result;
Showmessage(Options);
Result := MenuItemAddRichMedias('MyMenu', Options, Clicks, '', '3:3:3:3:80');
//---Click : BackGround Images
JSONItemClear('Click');
JSONItemClear('Clicks');
Result := JSONItemBuild('Click', 'ItemID', '0');
Result := JSONItemBuild('Click', 'ItemIDSub', '');
Result := JSONItemBuild('Click', 'SystemClickID', '8');
Result := JSONItemBuild('Click', 'ClickBlock', 'HeaderBlock,BodyBlock');
Result := JSONItemBuild('Click', 'Description', 'BackGround Images');
Result := JSONItemBuild('Clicks', 'Click', Result);
Clicks := Result;
//Showmessage(Options);
Result := MenuItemAddRichMedias('MyMenu', Options, Clicks, '', '3:3:3:3:80');
//---Click : Messenger
JSONItemClear('Click');
JSONItemClear('Clicks');
Result := JSONItemBuild('Click', 'ItemID', '0');
Result := JSONItemBuild('Click', 'ItemIDSub', '');
Result := JSONItemBuild('Click', 'SystemClickID', '9');
Result := JSONItemBuild('Click', 'ClickBlock', 'HeaderBlock,BodyBlock');
Result := JSONItemBuild('Click', 'Description', 'Messenger');
Result := JSONItemBuild('Clicks', 'Click', Result);
Clicks := Result;
//Showmessage(Options);
Result := MenuItemAddRichMedias('MyMenu', Options, Clicks, '', '3:3:3:3:80');
//---Click : Social
JSONItemClear('Click');
JSONItemClear('Clicks');
Result := JSONItemBuild('Click', 'ItemID', '0');
Result := JSONItemBuild('Click', 'ItemIDSub', '');
Result := JSONItemBuild('Click', 'SystemClickID', '10');
Result := JSONItemBuild('Click', 'ClickBlock', 'HeaderBlock,BodyBlock');
Result := JSONItemBuild('Click', 'Description', 'Social');
Result := JSONItemBuild('Clicks', 'Click', Result);
Clicks := Result;
//Showmessage(Options);
Result := MenuItemAddRichMedias('MyMenu', Options, Clicks, '', '3:3:3:3:80');
Result := InputMenu('MyMenu', 600, '', '');
Exit;
var result : string;
var ItemsIDs : string;
var ItemsTypes : string;
var ItemsTexts : string;
var ItemsLinks : string;
var Margin : string;
var Options : string;
Margin := '3:11:3:11:32';
IF ExternalFunctionParameters <> '' THEN
(
ShowMessage(ExternalFunctionParameters);
);
/*
ItemsIDs := '17,1f612,0,1';
ItemsTypes := '1,2,3,4,5,6,7'; //---1=ImageID, 2=Emoji Unicode, 3=CheckBox, 4=Text, 5=Flag, 6=User Page, 7=Chat Box
ItemsTexts := '11,12,Mon,Sun';
ItemsLinks := '*141*5#,*141*5*1#,,';
Resul := MenuItemAddTagsItems('MyMenu', ItemsIDs, ItemsTypes, ItemsTexts, ItemsLinks, Margin);
*/
Result := MenuItemAdd('MyMenu','Yaounde', '', '1', '', '', '', '', '', '', '');
Result := MenuItemAdd('MyMenu','Douala', '', '2', '', '', '', '', '', '', '');
//---Image
Result := JSONItemBuild('Item1', 'ItemID', '17340');
Result := JSONItemBuild('Item1', 'ItemID1', '');
Result := JSONItemBuild('Item1', 'ItemType', '1');
Result := JSONItemBuild('Item1', 'ItemText', 'Image');
Result := JSONItemBuild('Item1', 'ItemBackgroundColor', '#ffffff');
Result := JSONItemBuild('Item1', 'ItemTextColor', '#000000');
Result := JSONItemBuild('Item1', 'ItemTextFontSize', '12');
Result := JSONItemBuild('Item1', 'ItemTextFontStyle', '500');
Result := JSONItemBuild('Item1', 'ItemLink', '');
Result := JSONItemBuild('Item1', 'ItemLinkOptions', 'FM_NO_CACHE');
Result := JSONItemBuild('Item1', 'ItemAlign', 'left');
Result := JSONItemBuild('Items', 'ItemID1', Result);
//---Image + Link
Result := JSONItemBuild('Item2', 'ItemID', '17');
Result := JSONItemBuild('Item2', 'ItemID1', '');
Result := JSONItemBuild('Item2', 'ItemType', '1');
Result := JSONItemBuild('Item2', 'ItemText', 'Link Image');
Result := JSONItemBuild('Item2', 'ItemLink', '*141*5*1#');
Result := JSONItemBuild('Item2', 'ItemLinkOptions', 'FM_NO_CACHE,FM_NATIVE_TERMINAL');
Result := JSONItemBuild('Item2', 'ItemBackgroundColor', '#077dc1');
Result := JSONItemBuild('Item2', 'ItemTextColor', '#ffffff');
Result := JSONItemBuild('Item2', 'ItemTextFontSize', '12');
Result := JSONItemBuild('Item2', 'ItemTextFontStyle', '500');
Result := JSONItemBuild('Item2', 'ItemAlign', 'right');
Result := JSONItemBuild('Items', 'ItemID2', Result);
//---Emoji
Result := JSONItemBuild('Item3', 'ItemID', '1f612');
Result := JSONItemBuild('Item3', 'ItemID1', '');
Result := JSONItemBuild('Item3', 'ItemType', '2');
Result := JSONItemBuild('Item3', 'ItemText', 'Emoji');
Result := JSONItemBuild('Item3', 'ItemLink', '');
Result := JSONItemBuild('Items', 'ItemID3', Result);
//---CheckBox On
Result := JSONItemBuild('Item4', 'ItemID', '1');
Result := JSONItemBuild('Item4', 'ItemID1', '');
Result := JSONItemBuild('Item4', 'ItemType', '3');
Result := JSONItemBuild('Item4', 'ItemText', 'CheckBox');
Result := JSONItemBuild('Item4', 'ItemLink', '');
Result := JSONItemBuild('Items', 'ItemID4', Result);
//---CheckBox Off
Result := JSONItemBuild('Item5', 'ItemID', '0');
Result := JSONItemBuild('Item5', 'ItemID1', '');
Result := JSONItemBuild('Item5', 'ItemType', '3');
Result := JSONItemBuild('Item5', 'ItemText', 'CheckBox');
Result := JSONItemBuild('Item5', 'ItemLink', '');
Result := JSONItemBuild('Items', 'ItemID5', Result);
//---FM Script
Result := JSONItemBuild('Item6', 'ItemID', '0');
Result := JSONItemBuild('Item6', 'ItemID1', '');
Result := JSONItemBuild('Item6', 'ItemType', '4');
Result := JSONItemBuild('Item6', 'ItemText', 'FMScript');
Result := JSONItemBuild('Item6', 'ItemBackgroundColor', '#ffffff');
Result := JSONItemBuild('Item6', 'ItemTextColor', '#000000');
Result := JSONItemBuild('Item6', 'ItemTextFontSize', '12');
Result := JSONItemBuild('Item6', 'ItemTextFontStyle', '500');
Result := JSONItemBuild('Item6', 'ItemLink', '');
Result := JSONItemBuild('Item6', 'ItemScriptID', '76656');
Result := JSONItemBuild('Item6', 'ItemScriptTimer', '1000');
Result := JSONItemBuild('Item6', 'ItemLinkOptions', 'FM_NO_CACHE,FM_NATIVE_TERMINAL');
Result := JSONItemBuild('Items', 'ItemID6', Result);
//---Flags
//---Cameroon
Result := JSONItemBuild('Item7', 'ItemID', 'CM');
Result := JSONItemBuild('Item7', 'ItemID1', '');
Result := JSONItemBuild('Item7', 'ItemType', '5');
Result := JSONItemBuild('Item7', 'ItemText', 'Cameroon');
Result := JSONItemBuild('Item7', 'ItemLink', '');
Result := JSONItemBuild('Items', 'ItemID7', Result);
//---Canada
Result := JSONItemBuild('Item8', 'ItemID', 'CA');
Result := JSONItemBuild('Item8', 'ItemID1', '');
Result := JSONItemBuild('Item8', 'ItemType', '5');
Result := JSONItemBuild('Item8', 'ItemText', 'Canada');
Result := JSONItemBuild('Item8', 'ItemLink', '');
Result := JSONItemBuild('Items', 'ItemID8', Result);
//---Image Http link
Result := JSONItemBuild('Item8', 'ItemID', 'https://lh3.googleusercontent.com/-m7rjM8ExeUk/VkyZ6h35YgI/AAAAAAAAAGU/bPAo3ZNg--Uiuw7JU4GZDKRi2jiBOlMvQCEwYBhgL/w139-h140-p/YCD_5505.JPG');
Result := JSONItemBuild('Item8', 'ItemID1', '');
Result := JSONItemBuild('Item8', 'ItemType', '6');
Result := JSONItemBuild('Item8', 'ItemText', 'Google Image');
Result := JSONItemBuild('Item8', 'ItemLink', '');
Result := JSONItemBuild('Items', 'ItemID8', Result);
Options := Result;
MenuItemAddTagsItems2('MyMenu', Options, 'center', Margin);
Result := InputMenu('MyMenu', 60000, '', '');
VAR Result : String;
VAR FieldID1 : String;
VAR FieldID2 : String;
VAR Options : String;
VAR Js : String;
//---InputFieldAdd(InputName, FieldName, Visible, Password, DefaultValue, Length, Align, PickList, Data, Color, TextColor, Disabled, ReadOnly, DigitsOnly : String);
Result := MenuItemAdd('MyMenu','My Blinblin', '', '', '', '', '', '', '', '', '');
Result := MenuItemAdd('MyMenu','', '', '', '', '', '', '', '', '', '');
FieldID1 := MenuItemAdd('MyMenu','Click Here', '', '', '', '', '', '', '', '', '');
FieldID1 := FieldID1 + '_gui';
Js := '';
//Options := JSONItemBuild('JSONName', 'Js', Js);
//-----------------Build Options------------------------------------------------
Options := JSONItemBuild('Options', 'Type', '');
Options := JSONItemBuild('Options', 'ScriptID', '');
Options := JSONItemBuild('Options', 'ScrollEndPoint', '');
Options := JSONItemBuild('Options', 'Javascript', Js);
Result := InputMenu('MyMenu', 2500, '', '', '1', '1', Options);
var result, Seperator, Params : string;
Seperator := ':::';
Params := 'false'; //preferFrontCamera : true, // iOS and Android
Params := Params + Seperator + 'true'; //showFlipCameraButton : true, // iOS and Android
Params := Params + Seperator + 'true'; //showTorchButton : true, // iOS and Android
Params := Params + Seperator + 'true'; //torchOn: true, // Android, launch with the torch switched on (if available)
Params := Params + Seperator + 'true'; //saveHistory: true, // Android, save scan history (default false)
Params := Params + Seperator + 'FM Capture Demo'; //prompt : "Place a barcode inside the scan area", // Android
Params := Params + Seperator + '500'; //resultDisplayDuration: 500, // Android, display scanned text for X ms. 0 suppresses it entirely, default 1500
Params := Params + Seperator + 'QR_CODE,PDF_417'; //formats : "QR_CODE,PDF_417", // default: all but PDF_417 and RSS_EXPANDED
Params := Params + Seperator + 'portrait'; //orientation : "landscape", // Android only (portrait|landscape), default unset so it rotates with the device
Params := Params + Seperator + 'false'; //disableAnimations : true, // iOS
Params := Params + Seperator + 'false'; //disableSuccessBeep: false // iOS and Android
//result := GetBarcode(preferFrontCamera:::showFlipCameraButton:::showTorchButton:::torchOn:::saveHistory:::prompt:::resultDisplayDuration:::formats:::orientation:::disableAnimations:::disableSuccessBeep*/)
result := GetBarcode(Params);
ShowMessage('Barcode is : ' + result);
Exit;
/*
Barcode Types
QR_CODE
DATA_MATRIX
UPC_A
UPC_E
EAN_8
EAN_13
CODE_39
CODE_93
CODE_128
CODABAR
ITF
RSS14
PDF417
RSS_EXPANDED
MSI
AZTEC
*/