Re: Do you use ADB (or ScreenCopy) with Android & Windows?

Liste des GroupesRevenir à cm android 
Sujet : Re: Do you use ADB (or ScreenCopy) with Android & Windows?
De : usenet (at) *nospam* andyburns.uk (Andy Burns)
Groupes : comp.mobile.android
Date : 09. May 2025, 11:49:58
Autres entêtes
Message-ID : <m864ulFhibcU4@mid.individual.net>
References : 1 2 3 4 5 6 7 8
User-Agent : Mozilla Thunderbird
Marion wrote:

y'mean some4thing like this?
I tried co-pilot
"write a script to reserve an tcp port"
it did it in Python
"in cmd.exe"
it wrote a one-liner using netsh
"make it retry until it finds an available port"
it added a loop
"limit to ten retries"
it obeyed
"set resulting port in a variable"
the result, which I haven't tried ...
@echo off
set /a port=8080
set /a retries=0
set /a max_retries=10
set reserved_port=
:retry
if %retries% GEQ %max_retries% (
     echo Failed to find an available port after %max_retries% retries.
     pause
     exit /b 1
)
netsh int ipv4 add excludedportrange tcp %port% 1 >nul 2>&1
if %errorlevel% == 0 (
     set reserved_port=%port%
     echo Successfully reserved TCP port %reserved_port%
) else (
     echo Port %port% is in use. Trying next...
     set /a port+=1
     set /a retries+=1
     goto retry
)
echo The reserved port is: %reserved_port%
pause

Date Sujet#  Auteur
5 May 25 * Do you use ADB (or ScreenCopy) with Android & Windows?24Marion
9 May 25 `* Re: Do you use ADB (or ScreenCopy) with Android & Windows?23Arno Welzel
9 May 25  `* Re: Do you use ADB (or ScreenCopy) with Android & Windows?22Marion
9 May 25   +* Re: Do you use ADB (or ScreenCopy) with Android & Windows?9Andy Burns
9 May 25   i`* Re: Do you use ADB (or ScreenCopy) with Android & Windows?8Marion
9 May 25   i +* Re: Do you use ADB (or ScreenCopy) with Android & Windows?6Marion
9 May 25   i i+- Re: Do you use ADB (or ScreenCopy) with Android & Windows?1Marion
9 May 25   i i`* Re: Do you use ADB (or ScreenCopy) with Android & Windows?4Andy Burns
9 May 25   i i `* Re: Do you use ADB (or ScreenCopy) with Android & Windows?3Marion
9 May 25   i i  `* Re: Do you use ADB (or ScreenCopy) with Android & Windows?2Andy Burns
9 May 25   i i   `- Re: Do you use ADB (or ScreenCopy) with Android & Windows?1Marion
9 May 25   i `- Re: Do you use ADB (or ScreenCopy) with Android & Windows?1Andy Burns
9 May 25   `* Re: Do you use ADB (or ScreenCopy) with Android & Windows?12Andy Burns
9 May 25    +- Re: Do you use ADB (or ScreenCopy) with Android & Windows?1Marion
9 May 25    `* Re: Do you use ADB (or ScreenCopy) with Android & Windows?10Frank Slootweg
9 May 25     +* Re: Do you use ADB (or ScreenCopy) with Android & Windows?3Marion
9 May 25     i`* Re: Do you use ADB (or ScreenCopy) with Android & Windows?2Frank Slootweg
9 May 25     i `- Re: Do you use ADB (or ScreenCopy) with Android & Windows?1Marion
9 May 25     `* Re: Do you use ADB (or ScreenCopy) with Android & Windows?6Andy Burns
9 May 25      `* Re: Do you use ADB (or ScreenCopy) with Android & Windows?5Frank Slootweg
9 May 25       `* Re: Do you use ADB (or ScreenCopy) with Android & Windows?4Andy Burns
9 May 25        +* Re: Do you use ADB (or ScreenCopy) with Android & Windows?2Frank Slootweg
9 May 25        i`- Re: Do you use ADB (or ScreenCopy) with Android & Windows?1Marion
9 May 25        `- Re: Do you use ADB (or ScreenCopy) with Android & Windows?1Marion

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal