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

v1.20 my .vbs scripts not working #2778

Closed
nr1995 opened this issue Nov 14, 2021 · 11 comments
Closed

v1.20 my .vbs scripts not working #2778

nr1995 opened this issue Nov 14, 2021 · 11 comments

Comments

@nr1995
Copy link

nr1995 commented Nov 14, 2021

Hi, noob here.
These little .vbs scripts of mine worked until v1.20.
Now they open a new adb.exe in Task Manager but nothing appears.
Am I missing something?
Thanks

strCommand = "cmd /c scrcpy.exe --max-fps 1 --crop 260:70:415:93 --window-title WeChat --window-x 1792 --window-y 977 --window-width 88 --window-height 22 --window-borderless --always-on-top"
For Each Arg In WScript.Arguments
strCommand = strCommand & " """ & replace(Arg, """", """""""""") & """"
Next
CreateObject("Wscript.Shell").Run strCommand, 0, false

@rom1v
Copy link
Collaborator

rom1v commented Nov 14, 2021

Replace the last line by:

CreateObject("Wscript.Shell").Run strCommand, 1, false
WScript.Sleep 5000

Then run scrcpy-noconsole.vbs from a console (cmd.exe), you'll have time to see the error messages.

@nr1995
Copy link
Author

nr1995 commented Nov 14, 2021

Oh, the problem's not with the script.
The problem is that I can only have one window open at a time.
Whichever script I open first is OK. Whichever I try second won't work.
I only have one phone connected, btw.

@rom1v
Copy link
Collaborator

rom1v commented Nov 14, 2021

Did it work on v1.19?

What's the error for the second scrcpy instance?

@nr1995
Copy link
Author

nr1995 commented Nov 14, 2021

Yeah I'd been happily using several .vbs scripts at once on v1.19 for a while.

Sorry I'm not very technical, so I probably did it wrong,
but I didn't seem to get any error message in the console window.

I typed cd /d D:\phone stuff\scrcpy to get to the SCRCPY folder,
then typed scrcpy-noconsole.vbs to run that script, which worked,
then typed battery.vbs to open another one of my .vbs which worked in v1.19,
but nothing happened. No error either. Even though it had the changed last few lines like you gave me.

@rom1v
Copy link
Collaborator

rom1v commented Nov 14, 2021

Could you try without your vbs script?

Just open two scrcpy instances (both over USB, both other wifi, or one USB one wifi).

Refs #2779

@nr1995
Copy link
Author

nr1995 commented Nov 14, 2021

I tried two of scrcpy-noconsole.vbs (which I haven't edited), but just the same as before.
First one is fine, second one does nothing.
Everything is over USB.
Windows 10 64-bit, btw.

@rom1v
Copy link
Collaborator

rom1v commented Nov 14, 2021

The problem is that I can only have one window open at a time.

Please test #2783, it should fix this issue.

@rom1v
Copy link
Collaborator

rom1v commented Nov 15, 2021

@nr1995 I just pushed a"final" version (hopefully) of the fix in #2783. I provide new binaries on that PR.

Could you please test them and confirm everything works as expected for you?

I think I will publish a new hotfix release (1.20.1) for this bug soon.

@rom1v
Copy link
Collaborator

rom1v commented Nov 15, 2021

Fixed by #2783. If this is not the case, please reopen.

@rom1v rom1v closed this as completed Nov 15, 2021
@nr1995
Copy link
Author

nr1995 commented Nov 15, 2021

@nr1995 I just pushed a"final" version (hopefully) of the fix in #2783. I provide new binaries on that PR.

Could you please test them and confirm everything works as expected for you?

I think I will publish a new hotfix release (1.20.1) for this bug soon.

Your new scrcpy.exe and scrcpy-server seem to fix the problem.
Thanks!

@rom1v
Copy link
Collaborator

rom1v commented Nov 15, 2021

Thank you for your feedback!

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

2 participants