scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

batch file (sample attatched) to make it user friendly

Open Uddhav07 opened this issue 2 years ago • 3 comments

  • [ ] I have checked that a similar feature request does not already exist.

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

making it more user friendly by having a batch file to do the stuff for you while users only say yes or no

Describe alternatives you've considered

Additional context

some code ive made for myself might be a good headstart

d`@echo off cd "C:\Users\UserName\Music\scrcpy-win64-v1.24" :main echo 1. usb echo 2. tcp/ip echo 3. change ip address echo.

set /p input=enter an option: set /p bitrate=reduce quality to improve perfomance(y/n(default)) set /p aot=Always on top(y(default)/n): set /p rec=Turn on recording(y/n(default)):

set a=--always-on-top set r= set bit=

if %aot%==n (set a=) if %r%==y (set r=--record file.mp4) if %bitrate%==y (set bit=-m800 --max-fps 15)

if %input%==1 ( scrcpy -d %a% --turn-screen-off --stay-awake --disable-screensaver %r% %bit% )

else if %input%==2 ( scrcpy -e %a% -b2M --turn-screen-off --stay-awake --disable-screensaver %r% %bit% )

else if %input%==3 ( set /p address=enter new ip address: scrcpy --tcpip=%address% )`

Uddhav07 avatar Aug 01 '22 21:08 Uddhav07

hello, is there a way to do this same thing only through a vbs script? I have a vbs script to run scrcpy but i also audio forward with sndcpy. Recently there's been about a 450ms delay so I've had to start using the command console to instill it. I wanted to use vbs just to get rid of the command window so it's not a big deal if i have to keep using it but it's annoying enough to ask for help lol.

This is the CMD line I would like to convert to VBS:

./scrcpy --display-buffer=450

This is my current VBS just to run scrcpy without the buffer:

strCommand = "cmd /c scrcpy.exe"

For Each Arg In WScript.Arguments strCommand = strCommand & " """ & replace(Arg, """", """""""""") & """" Next

CreateObject("Wscript.Shell").Run strCommand, 0, false

How can I convert this to code to run it? tried looking it up but i don't understand enough about coding to figure out what is relevant and not relevant material to this issue

ballin4dapandas avatar Aug 09 '22 18:08 ballin4dapandas

Replace:

strCommand = "cmd /c scrcpy.exe"

by

strCommand = "cmd /c scrcpy.exe --display-buffer=450"

rom1v avatar Aug 09 '22 20:08 rom1v

@echo off cd "C:\Users\Uddhav\Music\scrcpy-win64-v1.24" :main echo 1. usb echo 2. tcp/ip echo 3. Custom ip address echo.

set aot=n set rec=n set /p input=enter an option: set /p aot=Always on top(y/n*): set /p rec=Turn on recording(y/n*):

set a=--always-on-top set r=

if %aot%==n (set a=) if %rec%==y (set r=--record file.mp4)

if %input%==1 ( scrcpy -d %a% --turn-screen-off --stay-awake --disable-screensaver %r% ) else if %input%==2 ( scrcpy --tcpip=192.168.1.35 %a% --turn-screen-off --stay-awake --disable-screensaver %r% -b2M -m800 --max-fps 15 ) else if %input%==3 ( set /p address=enter new ip address: scrcpy --tcpip=%address% ) else if %input%==4 ( scrcpy --tcpip )

Uddhav07 avatar Aug 10 '22 11:08 Uddhav07