mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-19 19:15:08 +00:00
add devices msgbox prompt
This commit is contained in:
parent
b3f626feee
commit
a2eba8d4ca
1 changed files with 24 additions and 6 deletions
|
@ -1,7 +1,25 @@
|
|||
strCommand = "cmd /c scrcpy.exe"
|
||||
|
||||
For Each Arg In WScript.Arguments
|
||||
strCommand = strCommand & " """ & replace(Arg, """", """""""""") & """"
|
||||
Next
|
||||
|
||||
CreateObject("Wscript.Shell").Run strCommand, 0, false
|
||||
Dim oShell,exeRs
|
||||
Set oShell = CreateObject("WSCript.shell")
|
||||
commandLine = "adb.exe devices"
|
||||
Set exeRs = oShell.Exec(commandLine)
|
||||
outs = exeRs.StdOut.ReadAll()
|
||||
strs= Split(outs,VbCrLf)
|
||||
Dim dev
|
||||
for i=1 to ubound(strs)
|
||||
dev = Replace(strs(i), "device", "")
|
||||
dev = Replace(dev, " ", "")
|
||||
dev = Trim(dev)
|
||||
If (Len(dev)) then
|
||||
v=MsgBox("scrcpy -s "&dev&"?",1)
|
||||
If ( v =1 ) then
|
||||
strCommand = strCommand & " -s " & dev
|
||||
For Each Arg In WScript.Arguments
|
||||
strCommand = strCommand & " """ & replace(Arg, """", """""""""") & """"
|
||||
Next
|
||||
CreateObject("Wscript.Shell").Run strCommand, 0, false
|
||||
End If
|
||||
End If
|
||||
next
|
||||
Set oShell = Nothing
|
||||
Set exeRs = Nothing
|
||||
|
|
Loading…
Add table
Reference in a new issue