Changes

Jump to navigation Jump to search
m
Line 50: Line 50:  
{{NoteLine|Create glossary entries for user interface, user-interface application layer, application structure, application layer, database application layer, scripting application layer, etc}}  
 
{{NoteLine|Create glossary entries for user interface, user-interface application layer, application structure, application layer, database application layer, scripting application layer, etc}}  
 
{{NoteLine|Insert here the UI index wikitext}}
 
{{NoteLine|Insert here the UI index wikitext}}
  −
=== User interface examples ===
  −
{{NoteLine|Move this section to the right place if necessary}}
  −
{{NoteLine|Move the following code to the scripting layer}}
  −
To open WhatsApp on the desired contact, the model to use is this:
  −
{{NoteLine|Edit the following script as needed, then move to the scripting layer}}
  −
  −
To insert library content, simply define the desired variables.
  −
  −
var w ="https://wa.me/phone_number"
  −
  −
var i = intent("android.intent.action.VIEW")
  −
  −
i.date(w)
  −
  −
i.send()
  −
  −
The difficulty may be in concatenating https://wa.me/ to the contact number, which is achieved with three variables:
  −
  −
var w1 = "https://wa.me/"
  −
  −
var t = entry().field ("Phone")
  −
  −
var w = w1 + t;
  −
  −
'''Example'''
  −
  −
var name = entry().field("Name")
  −
  −
// Now you will need one more variable to concatenate with the previous ones:
  −
  −
var d="?text="
  −
  −
which results:
  −
  −
var w = w1 + t + d // respect this order for the sake of nomenclature
  −
  −
The data now follows:
  −
  −
var w = w1 + t + d + name
  −
  −
// Line breaks, if necessary in view of the data to be sent, are achieved with \n to insert into a variable and then join.
  −
  −
Ex.:
  −
var ml = "\n"
  −
var w = w1 + t + d + name + ml
      
== The Memento application ''Scripting'' layer ==
 
== The Memento application ''Scripting'' layer ==

Navigation menu