settings - Settings
10/22/22Less than 1 minute
[Added in v8.2.0]
This module lets you control some internal Auto.js settings, such as stability mode and “Volume Up to stop scripts”. In the future it will also support modifying some system settings.
$settings.setEnabled(key, value)
key{string} Feature key to toggle. Current keys include:stop_all_on_volume_upStop all scripts when Volume Up is pressed (enabled by default)not_show_consoleDo not show the log/console UI on startupforeground_serviceEnable foreground service notification (keep-alive)boot_restartSupport auto-start on boot. 💡 Note: takes effect only after uninstalling the old version and installing this Advanced version. Contact QQ: 68107808
value{boolean} Whether to enable the feature
Enable/disable a feature toggle.
// Disable foreground service
$settings.setEnabled('foreground_service', false);
// Disable “Volume Up stops all scripts”
$settings.setEnabled("stop_all_on_volume_up", false);$settings.isEnabled(key)
key{string} Feature key. See$settings.setEnabled().- Returns {boolean} Whether it is enabled
Check whether a feature toggle is enabled.
// Print whether some toggles are enabled
log('Stop all scripts on Volume Up: ' + $settings.isEnabled('stop_all_on_volume_up'));
log('Do not show console on startup: ' + $settings.isEnabled('not_show_console'));
log('Foreground service: ' + $settings.isEnabled('foreground_service'));