This project consists of two batch scripts designed for task automation. The scripts enable conditional execution based on a mode (e.g., "Faculdade" or "Recuperar") and user interaction. These scripts use a configuration file to determine tasks and provide a dynamic interface for user control.
The aim of these scripts is to:
- Automate task management based on system status.
- Dynamically process tasks from a configuration file.
- Provide user interaction to choose between different modes.
- Configuration File:
MODO_FAC_CODE.txt
contains task IDs for different modes. - Batch Scripts:
- Mode-Driven Automation: Executes tasks based on system conditions (e.g., battery status).
- Interactive Script: Allows user input to select and execute tasks dynamically.
- Dynamic Task Management:
- Executes or terminates tasks based on the specified mode.
- Fetches tasks dynamically from the configuration file.
- User Interaction:
- Allows users to choose between "Faculdade," "Recuperar," or terminating the script.
- Condition-Based Execution:
- Automates task execution based on system battery status.
- Reads
MODO_FAC_CODE.txt
to fetch task IDs. - Checks battery status using
wmic path Win32_Battery
. - Executes tasks based on the following modes:
- Faculdade:
- Terminates processes listed in the second line of
MODO_FAC_CODE.txt
.
- Terminates processes listed in the second line of
- Recuperar:
- Executes commands listed in the third line of
MODO_FAC_CODE.txt
.
- Executes commands listed in the third line of
- Faculdade:
- Path:
C:\MODO_FAC_CODE.txt
- Content Format:
- First Line: Placeholder or unused.
- Second Line: Task IDs for "Faculdade" mode.
- Third Line: Task IDs or commands for "Recuperar" mode.
Example:
# Configuration File
1 2 3
notepad.exe calc.exe
-
Prepare the Configuration File:
- Create
C:\MODO_FAC_CODE.txt
with task IDs or commands.
- Create
-
Run the Script:
- For automated execution:
batch_script_1.bat
- For interactive mode:
batch_script_2.bat
- For automated execution:
-
Modes:
- "Faculdade": Terminates tasks defined in the configuration file.
- "Recuperar": Executes commands defined in the configuration file.
- Add advanced error handling for missing files or invalid configurations.
- Enable logging for task execution.
- Expand configuration file capabilities for more complex scenarios.
Thank you for exploring this project! 💡