> For the complete documentation index, see [llms.txt](https://electoriaengine.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://electoriaengine.gitbook.io/api/engine/sendengine-and-database.md).

# Sendengine and Database

## Sendengine

<pre class="language-javascript" data-full-width="true"><code class="lang-javascript">sendengine({
  fullscreen:true,//goes to full screen
  center:true,//puts the application in the center of the screen
  exit:true,//exit to game
  appresize: {//changing the resolution
    x:1900,
    y:1000
  },
  changestatusbar:"#onlyhexcode",//changes the color of the top of the application
  sendalertbox:"hello world",//warns at the bottom
  changescreenstatus:1,//change the direction of the phone [1,2,3]
  sendvibrate:1000,//You send a vibration to the phone. Enter time in milliseconds
  startpath:"/"//which html file to open index.html example
<strong>})
</strong></code></pre>

| changescreenstatus: 1                                                                                                             | changescreenstatus: 2                        | changescreenstatus: 3                        |
| --------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
| **Automatic** settings. If the phone is standing sideways, it becomes horizontal, if it is standing upright, it becomes vertical. | Forces the phone to stand in an **Portrait** | Forces the phone to stand in a **Landscape** |

<figure><img src="/files/3gsgItIRu7KuW8OVlyFC" alt="" width="375"><figcaption><p>sendalertbox example</p></figcaption></figure>

<figure><img src="/files/VOgDXFDb0runcUE22QrP" alt=""><figcaption><p>changestatusbar: changes the color of the selected part</p></figcaption></figure>

{% hint style="warning" %}
Don't forget to center the app after changing the resolution
{% endhint %}

## Database

{% code overflow="wrap" %}

```javascript
console.log(Database("get","test"))
Database("set","test","true")
Database("add","asdas",1)
Database("push","sxcac","hi")
Database("del","asdas",1)//delete remove
Database("del","sxcac")//delete remove
Database("reset")//deleteall
```

{% endcode %}

| Alternative 1 | Alternative 2 | Alternative 3 |
| ------------- | ------------- | ------------- |
| del           | delete        | remove        |
| reset         | deleteall     |               |

{% code overflow="wrap" %}

```javascript
async function run(){
    var connect = await WaitDatabase();//auto try
    //For example, for 20 seconds: WaitDatabase(20)
    if(connect) console.log("Database connected")
    else console.log("WHERE IS THE DATABASE BRO ????")
}
//OR
console.log(Engine_database.Engine_connected)//true or false
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://electoriaengine.gitbook.io/api/engine/sendengine-and-database.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
