Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This is a small feature that I have developed and tested myself. I would like to ask all the experts to help me take a look #5727

Open
wuwenjun9939 opened this issue Jan 3, 2025 · 0 comments

Comments

@wuwenjun9939
Copy link

::ps:This is the English version, and I also have a Chinese version (because I am Chinese, and both the translation and title are provided by "Baidu Translate")
cls
goto ready

: ready
cls
Title Screen Projection Control
goto menu

: menu
echo off
cls
echo ===================
Echo screen projection control
echo ===================
echo 1、 Directly enter the IP connection (provided that 5555 has been set up and unlimited debugging is always enabled)
echo 2、 Pairing code (applicable to novices)
echo 3、 Original version
set menu=
set /p menu=Please enter which one to start:
if "%menu%" == "1" goto ip
if "%menu%" == "2" goto pdm
if "%menu%" == "3" goto yuanshi
goto menu

: start
Choice /m "Do you want to continue opening?"
if %errorlevel% == 1 goto ip
if %errorlevel% == 2 exit

: ip
cls
Echo View IP Method: Settings - WiFi (wireless network) - Click on WiFi network (exclamation mark next to it) - IP address
Echo mobile network (data) doesn't need to come in anymore
Set/p ip=IP address:
Echo is connecting, please wait (remember to agree on your phone)
for /f "delims=" %%i in ("adb device") do set resc=%%i
echo %resc% | findstr device >nul && (
adb disconnect
adb connect %ip%
scrcpy.exe --pause-on-exit=if-error %*
goto start
) || (
Echo screen mirroring failed to activate, reason:% resc%
)

: pdm
cls
Echo View IP Method: Settings - WiFi (wireless network) - Click on WiFi network (exclamation mark next to it) - IP address
Echo mobile network (data) doesn't need to come in anymore
Set/p ip=IP address:
Set/p port=port number:
Set/p pdm=pairing code:
Echo is connecting, please wait (remember to agree on your phone)
for /f "delims=" %%i in ("adb pair %ip%:%port% %pdm%") do set resc=%%i
echo %resc% | findstr device >nul && (
scrcpy.exe --pause-on-exit=if-error %*
)

: yuanshi
scrcpy.exe --pause-on-exit=if-error %*
pause>nul
exit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant