home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 42,028 of 42,547   
   Andy Burnelli to Herbert Kleebauer   
   Re: Is there a way to put a command wind   
   23 Apr 22 13:36:01   
   
   XPost: alt.comp.os.windows-10, alt.comp.microsoft.windows   
   From: spam@nospam.com   
      
   Herbert Kleebauer wrote:   
      
   >> Note that brings up two windows, one of which is the mirrored   
   >> Android window, and the other of which is the "scrcpy.exe" command window:   
   >   
   > Then scrcpy.exe uses both, a GUI window and a console.   
   > But that has nothing to do with the CMD window.   
      
   Everything you said is correct.   
   Hence I apologize for being confused prior. Thank you for clarifying.   
      
   You (and Andy Burns) know more about Windows & command actions than I ever   
   will know, so I sincerely want to thank you for your kind-hearted help.   
      
   You are right. I was wrong. I ran all your tests (see below) and they worked   
   _exactly_ as you surmised they would.   
      
   > You can't close this console because   
   > the program needs it (maybe for some status or error output).   
      
   Yes. You are correct. I will give up on trying to close the "scrcpy console"   
   as the developers, for whatever reason, _want_ it to remain visible.   
      
   It's rare for me to fail to wrest control of Windows, but in this case, I   
   will admit defeat in that I can't get rid of that "scrcpy console" window   
   (other than to iconify it).   
      
   > If you start scrcpy.exe by a mouse click, both windows should be created.   
      
   You are correct.   
   The total number of windows depends on _how_ I run the command.   
      
   1. There is whatever "thing" the command is run inside of   
      a. That can be a CMD window   
      b. That can be a RUN box   
      c. That can be a shortcut TARGET   
   2. Then there is the "scrcpy console" window.   
   3. And then there is the resulting Android GUI.   
      
   As you correctly surmised, depending on _where_ I execute the scrcpy   
   command, the result could be two or three windows; but in every case, I   
   can't "kill" the scrcpy console (which was my original goal).   
      
   > If you start it within a CMD window, scrcpy.exe should use the CMD   
   > window as console, so no new console is created and CMD is suspended until   
   > scrcpy.exe is closed.   
      
   This is correct.   
      
   Here is a step-by-step test with the phone on the Wi-Fi network.   
   A. Run > cmd   
   B. ping 192.168.0.2 (just to ensure the TCP/IP connection is alive)   
   C. cd c:\app\editor\android\scrcpy   
   D. adb kill-server (this gives me a known baseline starting point)   
   E. adb connect 192.168.0.2:5555 (this returns me to the cmd prompt)   
   F. scrcpy (the CMD window turns into a scrcpy console)   
      
   As you correctly surmised, that does _two_ things:   
   1. The "scrcpy" console takes over the CMD window.   
   2. The Android GUI pops up   
      
   Then, when I press the Windows [x] box in the Android GUI...   
   1. That [x] kills the Android GUI window   
   2. And it kills the scrcpy process in the CMD window   
   3. Which gets me back the command prompt in the CMD window   
      
   > If you start it with "start scrcpy.exe" in a cmd   
   > window, then a new console is created and CMD get control back over its   
   > console immediately.   
      
   You are correct.   
      
   Here is a step-by-step test with the phone on the Wi-Fi network.   
   A. Run > cmd   
   B. ping 192.168.0.2   
   C. cd c:\app\editor\android\scrcpy   
   D. adb kill-server   
   E. adb connect 192.168.0.2:5555 (this returns me to the cmd prompt)   
   F. start scrcpy (this opens up a _separate_ scrcpy console)   
      
   That does _three_ things:   
   1. It opens up a _new_ console for the "scrcpy" output.   
   2. The Android GUI pops up   
   3. And it returns me to the cmd prompt in the cmd window   
      (I can close that command window without affecting anything else.)   
      
   Likewise, three windows open up if I put this in a shortcut TARGET:   
   TARGET=%comspec% /k cd /d "c:\app\editor\android\scrcpy" && adb connect   
   192.168.0.2:5555 && start scrcpy --always-on-top --tcpip=192.168.0.2:5555   
   a. It opens a cmd window   
   b. It opens a separate scrcpy console   
   c. It opens the Android GUI   
      
   The cmd window can be killed separately but killing either the Android GUI   
   or the scrpcpy console will kill both.   
      
   Lastly, this opens up three windows but instantly kills one of them:   
   TARGET=%comspec% /k cd /d "c:\app\editor\android\scrcpy" && adb connect   
   192.168.0.2:5555 && start scrcpy --always-on-top --tcpip=192.168.0.2:5555   
   &cls&exit   
   a. It opens a cmd window   
   b. It opens a separate scrcpy console   
   c. It opens the Android GUI   
   d. Then it kills the cmd window   
      
   In summary, you were always correct and I was confused - but in the end, I   
   agree with you on everything you've tried to help me to understand.   
      
   The net is that I can't easily get rid of the scrcpy console.   
   Thanks for your kind help and advice.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca