Skip to main content

Settings

The Settings module provides various configuration options to control how your macro behaves. Here are the key features:

Detection Settings

Minimum Score

  • Settings:getMinScore() - Get the current minimum threshold score for text/image detection
  • Settings:setMinScore(score: number) - Set the minimum threshold score for detection

Grayscale Mode

  • Settings:isGrayscale() - Check if grayscale mode is enabled
  • Settings:grayscaleOn() - Enable grayscale mode for faster detection
  • Settings:grayscaleOff() - Disable grayscale mode

Template Caching

  • Settings:cacheOn() - Enable template caching to improve performance
  • Settings:cacheOff() - Disable template caching

Delay Settings

Click Delay

  • Settings:getClickDelay() - Get the current click delay
  • Settings:setClickDelay(delayMs: number) - Set the delay between click actions

Swipe Delay

  • Settings:getSwipeDelay() - Get the current swipe delay
  • Settings:setSwipeDelay(delayMs: number) - Set the delay between swipe actions

Scan Interval

  • Settings:getScanInterval() - Get the current scan interval for detection
  • Settings:setScanInterval(interval: number) - Set the delay between detection scans

Example Usage

// Configure detection settings
Settings:setMinScore(0.8);
Settings:grayscaleOn();
Settings:cacheOn();

// Configure delays
Settings:setClickDelay(500);
Settings:setSwipeDelay(1000);
Settings:setScanInterval(200);

// Get current settings
minScore = Settings:getMinScore();
isGray = Settings:isGrayscale();
clickDelay = Settings:getClickDelay();

Block Configuration

Detection Settings

  • Minimum Score: Set the threshold score (0-1) for text and image detection
  • Grayscale Mode: Toggle grayscale processing for faster detection
  • Template Cache: Enable/disable template caching to optimize performance

Delay Settings

  • Click Delay: Set the delay between click actions (in milliseconds)
  • Swipe Delay: Set the delay between swipe actions (in milliseconds)
  • Scan Interval: Set the delay between detection scans (in milliseconds)

Example

Usage Tips

  1. Performance Optimization

    • Enable grayscale mode when color isn't important for detection
    • Use template caching when working with static screens
    • Adjust scan intervals based on your device's capabilities
  2. Timing Adjustments

    • Increase delays on slower devices
    • Use shorter delays for time-critical operations
    • Balance speed vs reliability
  3. Detection Tuning

    • Higher minimum scores (closer to 1) for more precise matching
    • Lower scores (closer to 0) for more flexible matching
    • Start with 0.8 and adjust as needed
  • Image Detection
  • Text Detection
  • Click
  • Swipe