mirror of
https://github.com/Genymobile/scrcpy.git
synced 2024-09-19 05:31:21 +02: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"
|
strCommand = "cmd /c scrcpy.exe"
|
||||||
|
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
|
For Each Arg In WScript.Arguments
|
||||||
strCommand = strCommand & " """ & replace(Arg, """", """""""""") & """"
|
strCommand = strCommand & " """ & replace(Arg, """", """""""""") & """"
|
||||||
Next
|
Next
|
||||||
|
|
||||||
CreateObject("Wscript.Shell").Run strCommand, 0, false
|
CreateObject("Wscript.Shell").Run strCommand, 0, false
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
next
|
||||||
|
Set oShell = Nothing
|
||||||
|
Set exeRs = Nothing
|
||||||
|
|
Loading…
Reference in a new issue