Route Script Development Description
The Route Script system defines the behavior and logic of your app using a JSON-based command structure. It allows you to control navigation, user actions, data handling, and conditional logic without writing traditional code. Each command in the script represents an action, a condition, or a sequence, enabling dynamic app behavior.
var).if, elif, else, and when-case constructs.page, page-finish, timeout, and timeout-finish.buy, use, login, chat, orders, tickets, and online-support.email, sms, or make calls.photo, video, pdf, web, and download.copy, share, toast, eval, set, delay, wallet, reset, and more.logout, change-pass, change-name, delete-account, charge, and update.| Command Name | Arguments | Has Commands | Description |
|---|---|---|---|
| var | name, value | No | Declare a variable with a name and value |
| if | exp | Yes | Conditional execution if expression is true |
| elif | exp | Yes | Conditional execution if previous if/elif failed |
| else | - | Yes | Executes commands if previous if/elif conditions failed |
| when | - | Yes | Start of a when-case block |
| case | value | Yes | A case inside a when block |
| else (when) | - | Yes | Default case for when block |
| yeno | title, text | Yes | Display a Yes/No dialog message with title and text |
| buy | product, price | Yes | Purchase a product with specified price |
| buy-use | product, price | Yes | Purchase and immediately use the product |
| use | product | Yes | Use a product |
| login | - | No | Login the user |
| page | pageName | No | Navigate to a page |
| page-finish | pageName | No | Finish or exit a page |
| timeout | pageName, timeout | No | Set a timeout for a page |
| timeout-finish | pageName, timeout | No | Finish timeout for a page |
| finish | - | No | Finish the current page |
| day-night | - | No | Toggle day/night mode |
| reset | - | No | Reset variables or state |
| open | url | No | Open a URL in browser |
| call | phone | No | Make a phone call |
| email, subject, text | No | Send an email | |
| sms | phone, text | No | Send an SMS |
| copy | text | No | Copy text to clipboard |
| share | text | No | Share text through system share |
| toast | text | No | Show a temporary toast message |
| chat | No | Open chat with specified email | |
| orders | - | No | Show user orders |
| tickets | - | No | Show tickets |
| online-support | - | No | Access online support |
| clean | key | No | Remove a variable |
| clean-starts | keys | No | Remove variables starting with specified keys |
| clean-likes | keys | No | Remove variables containing specified keys |
| clean-ends | keys | No | Remove variables ending with specified keys |
| photo | url | No | Display a photo from URL |
| video | url | No | Display a video from URL |
| url | No | Display a PDF from URL | |
| web | url | No | Open a web page |
| download | url | No | Download a file |
| download-open | url | No | Download a file and open it |
| eval | name, exp | No | Evaluate an expression and store result in variable |
| send | listingType | No | Send a listing type |
| wallet | - | No | Open wallet |
| dialog | pageName | No | Open a dialog page |
| menu | pageName | No | Open a menu page |
| logout | - | No | Logout the user |
| change-pass | - | No | Change user password |
| change-name | - | No | Change user display name |
| delete-account | - | No | Delete user account |
| charge | product, price | No | Charge a product or service |
| about | - | No | Show app information |
| update | - | No | Check for app updates |
| app | appID | No | Open another app by ID |
| send-ticket | - | No | Send a support ticket |
| send-chat | - | No | Send a chat message |
| locale | locale | No | Set the application locale |
| set | name, field, value | No | Set a field value for a named variable |
| delay | timeout | No | Delay execution for specified timeout |
Usage: Declare a variable with a name and value
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Name | String | {name} | Name of the variable |
| Value | String | {value} | Value of the variable |
Coding:
{
"name": "var",
"args": ["{name}","{value}"]
}
Usage: Conditional execution if expression is true
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Expression | String | {exp} | Expression and Conditions |
Coding:
{
"name": "if",
"args": ["{exp}"],
"cmds": []
}
Usage: Conditional execution if previous if/elif failed
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Expression | String | {exp} | Expression and Conditions |
Coding:
{
"name": "elif",
"args": ["{exp}"],
"cmds": []
}
Usage: Executes commands if previous if/elif conditions failed
Coding:
{
"name": "else",
"cmds": []
}
Usage: Start of a when-case block
Coding:
{
"name": "when",
"cmds": []
}
Usage: A case inside a when block
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Value | String | {value} | Value of when-case |
Coding:
{
"name": "case",
"args": ["{value}"],
"cmds": []
}
Usage: Default case for when block
Coding:
{
"name": "else",
"cmds": []
}
Usage: Display a Yes/No dialog message with title and text
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Title | String | {title} | Title of Yes/No Dialog |
| Text | String | {text} | Text of Yes/No Dialog |
Coding:
{
"name": "yeno",
"args": ["{title}","{text}"],
"cmds": []
}
Usage: Purchase a product with specified price
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Product | String | {product} | Product Name |
| Price | Number | {price} | Product Price |
Coding:
{
"name": "buy",
"args": ["{product}","{price}"],
"cmds": []
}
Usage: Purchase and immediately use the product
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Product | String | {product} | Product Name |
| Price | Number | {price} | Product Price |
Coding:
{
"name": "buy-use",
"args": ["{product}","{price}"],
"cmds": []
}
Usage: Use a product
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Product | String | {product} | Product Name |
Coding:
{
"name": "use",
"args": ["{product}"],
"cmds": []
}
Usage: Login the user
Coding:
{
"name": "login"
}
Usage: Navigate to a page
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| PageName | PageName | {pageName} | Page Name for opening this page |
Coding:
{
"name": "page",
"args": ["{pageName}"]
}
Usage: Finish or exit a page
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| PageName | PageName | {pageName} | Page Name for opening this page |
Coding:
{
"name": "page-finish",
"args": ["{pageName}"]
}
Usage: Set a timeout for a page
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| PageName | PageName | {pageName} | Page Name for opening this page |
| Timeout | Number | {timeout} | Timeout of opening page |
Coding:
{
"name": "timeout",
"args": ["{pageName}","{timeout}"]
}
Usage: Finish timeout for a page
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| PageName | PageName | {pageName} | Page Name for opening this page |
| Timeout | Number | {timeout} | Timeout of opening page |
Coding:
{
"name": "timeout-finish",
"args": ["{pageName}","{timeout}"]
}
Usage: Finish the current page
Coding:
{
"name": "finish"
}
Usage: Toggle day/night mode
Coding:
{
"name": "day-night"
}
Usage: Reset variables or state
Coding:
{
"name": "reset"
}
Usage: Open a URL in browser
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| URL | URL | {url} | URL of opening app |
Coding:
{
"name": "open",
"args": ["{url}"]
}
Usage: Make a phone call
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Phone | Phone | {phone} | Phone Number for calling |
{
"name": "call",
"args": ["{phone}"]
}
Usage: Send an email
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| {email} | Email address for sending email | ||
| Subject | String | {subject} | Subject of email |
| Text | String | {text} | Content of email |
Coding:
{
"name": "email",
"args": ["{email}","{subject}","{text}"]
}
Usage: Send an SMS
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Phone | Phone | {phone} | Phone Number for SMS |
| Text | String | {text} | Text of message |
Coding:
{
"name": "sms",
"args": ["{phone}","{text}"]
}
Usage: Copy text to clipboard
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Text | String | {text} | Text for copy |
Coding:
{
"name": "copy",
"args": ["{text}"]
}
Usage: Share text through system share
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Text | String | {text} | Text for share |
Coding:
{
"name": "share",
"args": ["{text}"]
}
Usage: Show a temporary toast message
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Text | String | {text} | Text for showing toast |
Coding:
{
"name": "toast",
"args": ["{text}"]
}
Usage: Open chat with specified email
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| {email} | Email of chat |
Coding:
{
"name": "chat",
"args": ["{email}"]
}
Usage: Show user orders
Coding:
{
"name": "orders"
}
Usage: Show tickets
Coding:
{
"name": "tickets"
}
Usage: Access online support
Coding:
{
"name": "online-support"
}
Usage: Remove a variable
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Key | String | {key} | Key name for clean |
Coding:
{
"name": "clean",
"args": ["{key}"]
}
Usage: Remove variables starting with specified keys
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Keys | String | {keys} | Key names for clean |
Coding:
{
"name": "clean-starts",
"args": ["{keys}"]
}
Usage: Remove variables containing specified keys
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Keys | String | {keys} | Key names for clean |
Coding:
{
"name": "clean-likes",
"args": ["{keys}"]
}
Usage: Remove variables ending with specified keys
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Keys | String | {keys} | Key names for clean |
Coding:
{
"name": "clean-ends",
"args": ["{keys}"]
}
Usage: Display a photo from URL
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| URL | URL | {url} | URL of photo |
Coding:
{
"name": "photo",
"args": ["{url}"]
}
Usage: Display a video from URL
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| URL | URL | {url} | URL of video |
Coding:
{
"name": "video",
"args": ["{url}"]
}
Usage: Display a PDF from URL
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| URL | URL | {url} | URL of PDF |
Coding:
{
"name": "pdf",
"args": ["{url}"]
}
Usage: Open a web page
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| URL | URL | {url} | URL of website |
Coding:
{
"name": "web",
"args": ["{url}"]
}
Usage: Download a file
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| URL | URL | {url} | URL of file |
Coding:
{
"name": "download",
"args": ["{url}"]
}
Usage: Download a file and open it
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| URL | URL | {url} | URL of file |
Coding:
{
"name": "download-open",
"args": ["{url}"]
}
Usage: Evaluate an expression and store result in variable
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Name | String | {name} | Variable Name |
| Expression | String | {exp} | Expression in this variable |
Coding:
{
"name": "eval",
"args": ["{name}","{exp}"]
}
Usage: Send a listing type
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| ListingType | ListingType | {listingType} | Listing Type for sending data |
Coding:
{
"name": "send",
"args": ["{listingType}"]
}
Usage: Open wallet
Coding:
{
"name": "wallet"
}
Usage: Open a dialog page
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| PageName | PageName | {pageName} | Page name of launched dialog |
Coding:
{
"name": "dialog",
"args": ["{pageName}"]
}
Usage: Open a menu page
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| PageName | PageName | {pageName} | Page name of launched menu |
Coding:
{
"name": "menu",
"args": ["{pageName}"]
}
Usage: Logout the user
Coding:
{
"name": "logout"
}
Usage: Change user password
Coding:
{
"name": "change-pass"
}
Usage: Change user display name
Coding:
{
"name": "change-name"
}
Usage: Delete user account
Coding:
{
"name": "delete-account"
}
Usage: Charge a product or service
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Product | String | {product} | Product name of charging wallet |
| Price | String | {product} | Price of this product |
Coding:
{
"name": "charge",
"args": ["{product}","{price}"]
}
Usage: Show app information
Coding:
{
"name": "about"
}
Usage: Check for app updates
Coding:
{
"name": "update"
}
Usage: Open another app by ID
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| AppID | AID | {appID} | AppID for launching Applin App inside this app |
Coding:
{
"name": "app",
"args": ["{appID}"]
}
Usage: Send a support ticket
Coding:
{
"name": "send-ticket"
}
Usage: Send a chat message
Coding:
{
"name": "send-chat"
}
Usage: Set the application locale
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Locale | Locale | {locale} | Locales such as "en", "fa", etc |
Coding:
{
"name": "locale",
"args": ["{locale}"]
}
Usage: Set a field value for a named variable
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Name | String | {name} | Element name |
| Field | String | {field} | Field name of element |
| Value | String | {value} | new set value for field of element |
Coding:
{
"name": "set",
"args": ["{name}","{field}","{value}"]
}
Usage: Delay execution for specified timeout
| Arguments | Type | Default Value | Description |
|---|---|---|---|
| Timeout | Number | {timeout} | Timeout of running commands |
Coding:
{
"name": "delay",
"args": ["{timeout}"]
}
1. Simple Page Navigation
{
"name": "page",
"args": ["HomePage"]
}
2. Conditional Logic
{
"name": "if",
"args": ["$logged==1"],
"cmds": [
{
"name": "page",
"args": ["dashboard"]
}
]
}
3. Show a Toast Message
{
"name": "toast",
"args": ["Welcome to the app!"]
}
4. Buy and Use a Product
{
"name": "buy-use",
"args": ["PremiumSubscription","9.99"]
}
5. Multi-step When-Case Logic
{
"name": "when",
"cmds": [
{
"name": "case",
"args": ["silver"],
"cmds": [
{"name": "toast", "args": ["Silver user access"]}
]
},
{
"name": "case",
"args": ["gold"],
"cmds": [
{"name": "toast", "args": ["Gold user access"]}
]
},
{
"name": "else",
"cmds": [
{"name": "toast", "args": ["No access level"]}
]
}
]
}