What the Script Does
How It Works
Batch Script Start
@echo off
rem Check if the script is already running minimized
if "%1"=="minimized" goto run
rem Re-run the script minimized
start /min cmd /c "%~f0" minimized
goto :eof
:run
:: Move the camera to preset 5
curl --digest -u username:password "http://192.168.1.1/cgi-bin/ptz.cgi?acti ... 2=5&arg3=0"
Batch Script End
What You Need to Change
Username and Password:
- Replace username:password with your camera’s login credentials.
Example: admin:mysecurepassword
- Replace 192.168.1.1 with the actual IP address of your camera.
Example: 192.168.0.100
- The arg2=5 part specifies the preset position to which the camera will move. Change the number 5 to the desired preset number.
Example: To move to preset 3, change arg2=5 to arg2=3.
Create the Batch File:
- Copy the script into a text file and save it with a .bat extension, e.g., MoveCamera.bat.
- Double-click the batch file to execute it. The camera will move to the specified preset position.
- You can assign this batch file to a button in StreamDeck for quick and easy camera control.
This simple batch script is a powerful tool for controlling your PTZ camera with ease. By customizing the username, password, IP address, and preset values, you can quickly adapt it to your setup. Whether you’re using it for home security, live streaming, or any other purpose, this script offers a convenient way to automate your camera movements.