How to Use Scripts in Cloud Phone? Automation Task Setup Tutorial
Scripts are the most powerful productivity tool for cloud phones. A cloud phone used only for manual operations isn't much different from a regular phone — but add scripts, and it can work autonomously 24/7: game idling, auto check-ins, batch operations, data collection, all without human supervision.\n\nChangChang Cloud Phone comes with a comprehensive script runtime environment, supporting multiple script formats and automated task scheduling. This tutorial walks you through the entire process from scratch — script import, configuration, and scheduled execution.\n\n## What Exactly Is a Cloud Phone Script?\n\nSimply put, a script is a sequence of pre-recorded or pre-written operation instructions. You write steps like "tap here → wait 3 seconds → tap there → enter text" into a file, import it into the cloud phone, and it executes automatically without manual intervention.\n\nChangChang Cloud Phone supports the following script types:\n\n| Script Type | Format | Difficulty | Use Case |\n|------------|--------|------------|----------|\n| Recorded Script | .script | ⭐ Beginner | Repeated taps, simple check-ins |\n| Script File | .lua | ⭐⭐ Intermediate | Conditional logic, loops |\n| Automation API | JSON config | ⭐⭐⭐ Advanced | Complex business workflows |\n\n## Step 1: Import Scripts to Cloud Phone\n\nThere are three ways to import scripts, depending on your source.\n\n### Method 1: Upload Script File Directly\n\nIf you already have a ready-made script file (exported from another device or downloaded from a script community), you can upload it directly:\n\n1. Open ChangChang Cloud Phone console, enter the target instance\n2. Click the "Script Manager" icon in the bottom toolbar\n3. Select "Import Script" → "Upload File"\n4. Choose a local script file and wait for upload to complete\n5. After successful upload, the script appears in the script list\n\n### Method 2: Choose from Cloud Script Library\n\nChangChang Cloud Phone has a built-in script library covering common scenarios like check-ins, idling, and data collection:\n\n1. Go to "Script Manager" → "Script Store"\n2. Browse by category or search by keyword\n3. Click "Install" for one-click import\n4. After installation, you can view and edit in the script list\n\n### Method 3: Write Scripts Online\n\nIf you know some scripting syntax, you can write directly in the cloud phone:\n\n1. Go to "Script Manager" → "New Script"\n2. Select script type (Recorded/Lua/JSON)\n3. Write script logic in the editor\n4. Save and it's ready to run\n\n## Step 2: Configure Script Parameters\n\nAfter importing, most scripts need parameter configuration before they can run properly.\n\n### Basic Parameters\n\n| Parameter | Description | Example |\n|-----------|-------------|--------|\n| Execution count | Number of loop iterations | 999 (infinite loop) |\n| Execution interval | Wait time between loops | 5000 (ms) |\n| Timeout | Max duration per execution | 3600 (seconds) |\n| Error handling | Behavior on error | Stop/Retry/Skip |\n\n### Advanced Parameters\n\n- Coordinate offset: Tap positions may differ across resolutions; adjust with offset values\n- Random delay: Add randomness to fixed delays to simulate human-like operation rhythm\n- Conditional trigger: Set trigger conditions, e.g., "execute when a specific image appears on screen"\n\n## Step 3: Set Up Automation Tasks\n\nGetting a script to run is just the first step. True automation means "scheduled execution" and "unattended operation." ChangChang Cloud Phone's task scheduling system makes this possible.\n\n### Create a Scheduled Task\n\n1. Go to "Task Manager" → "New Task"\n2. Select the script to execute\n3. Set the execution plan:\n\n| Execution Mode | Description | Use Case |\n|---------------|-------------|----------|\n| Run immediately | Starts right away | Quick testing |\n| Scheduled | Auto-starts at specified time | Daily check-ins, scheduled collection |\n| Loop | Repeats at intervals | Game idling, continuous resource farming |\n| Conditional trigger | Executes when conditions are met | Monitoring alerts, auto-response |\n\n4. Configure execution parameters (count, interval, timeout, etc.)\n5. Set notification method (push notification after completion)\n6. Click "Save and Start"\n\n### Multi-Script Orchestration\n\nIf your business requires multiple scripts to execute in sequence, ChangChang Cloud Phone supports script orchestration:\n\n\nScript A (Login) → Script B (Check-in) → Script C (Idle) → Script D (Logout)\n\n\nCreate an orchestration task in "Task Manager," add multiple script nodes in order, and set execution conditions and transition rules for each node. The system executes the workflow automatically, with auto-retry or node-jumping on errors.\n\n## Script Runtime Monitoring and Debugging\n\n### Real-Time Monitoring\n\nWhile a script runs, the ChangChang Cloud Phone console displays real-time status:\n\n- Current step: Shows which step the script is executing\n- Execution log: Detailed record of each operation\n- Screenshot snapshots: Periodic auto-screenshots for review\n- Resource usage: CPU, memory, and network consumption\n\n### Common Issue Troubleshooting\n\n| Issue | Possible Cause | Solution |\n|-------|---------------|----------|\n| Script doesn't execute | Parameters not configured | Check required parameters |\n| Tap position offset | Resolution mismatch | Adjust coordinate offset or use proportional coordinates |\n| Execution too fast | No delay set | Add execution interval and random delay |\n| Script stops midway | Timeout or exception | Check timeout settings and error handling strategy |\n| Loop not working | Execution count set to 1 | Change count to target value or 999 |\n\n## Script Best Practices\n\n1. Test before going live: Run new scripts in "immediate" mode first to verify logic before setting up scheduled or loop tasks\n2. Add random delays: Fixed intervals are easily detected as bot behavior; add 500-2000ms random delays between key operations\n3. Set error retries: Network fluctuations and app crashes are normal; set auto-retry 3 times before reporting errors\n4. Check logs regularly: Even when scripts are running, review logs daily to confirm no abnormal loops\n5. Organize by instance: When running different scripts on multiple cloud phones, give each instance and script a meaningful name for easy management\n\n## FAQ\n\nQ: Can scripts run in the background? Will they continue after closing the console?\n\nA: Yes. ChangChang Cloud Phone scripts execute in the cloud, independent of the local console. You can close your browser and computer, and the script keeps running. Reopen the console anytime to check status.\n\nQ: Can one cloud phone run multiple scripts simultaneously?\n\nA: Technically yes, but not recommended. Multiple scripts operating the same cloud phone can cause conflicts (e.g., two scripts tapping different positions simultaneously). We recommend one script per cloud phone instance; use multiple instances for parallel needs.\n\nQ: What happens if the cloud phone loses network during script execution?\n\nA: ChangChang Cloud Phone has a reconnection mechanism. After network recovery, the instance auto-reconnects and the script resumes from the breakpoint. If disconnection exceeds the timeout threshold, the script follows the error handling strategy (retry/stop/skip).\n\nQ: What if I don't know how to write scripts?\n\nA: Two options. First, use ChangChang Cloud Phone's recording feature — perform the operations manually once, and the system generates a script automatically. Second, browse the Script Store for ready-made scripts covering most common needs.\n\nQ: Do scripts consume extra cloud phone performance?\n\nA: Scripts themselves use minimal resources, mainly CPU and a small amount of memory. Normal usage won't noticeably impact cloud phone performance. However, for very complex script logic (heavy image recognition, intensive computation), we recommend Standard tier or above.



