A script created using C++ using the Windows API to swift access to frequently used folders and application. Using MinGW to create a executable, which can then be used to automatically run the script upon computer boot-up. This script only works on Windows, currently only test on Windows 11 and 10.
- Using C++ with the Windows API.
- Employed C++ string manipulation techniques to handle file paths, and conversion of narrow string to wide strings.
- Implemented a hotkey registration method, allowing to add preferred key combinations for various actions.
- Added error handling mechanisms to manage runtime error, providing which hotkey caused the failure.
- Allow the script to run automatically upon computer boot-up.
- Install MinGW, and ensure it is added to the path.
- Clone the project.
- In a terminal enter the directory as to where the file hotkey.cpp is located.
- In the terminal enter the following: g++ hotkey.cpp -o hotkey.exe. This will create an executable called hotkey.exe, change the name if need be.
- To run it from the program, in the terminal enter: ./hotkey. The message, Hotkey registered successfully! should appear if there are no errors.
- To run the script automatically on startup:
- Run this new command: g++ -mwindows hotkey.cpp -o hotkey.exe. This will allow the script to be executed as a application without the command prompt opening.
- Create a shortcut of the hotkey executable.
- Then using the keyboard shortcut Win + R
- Enter shell:startup in the dialog.
- In the folder it opened, move the shortcut into the file.