From 3e04c4113f7f30f2aa6d2f5385b0294ccf0de2f1 Mon Sep 17 00:00:00 2001 From: aerom Date: Tue, 5 May 2026 02:43:27 -0400 Subject: [PATCH] Auto-open browser after server start --- Iniciar.vbs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Iniciar.vbs b/Iniciar.vbs index 9abd960..fbdcb27 100644 --- a/Iniciar.vbs +++ b/Iniciar.vbs @@ -12,21 +12,17 @@ Dim oExec, sOut Set oExec = oShell.Exec("cmd /c netstat -aon | findstr :5503 | findstr LISTENING") sOut = oExec.StdOut.ReadAll() If Len(Trim(sOut)) > 0 Then - MsgBox "AidsMonitoring ya esta corriendo en el puerto 5503.", 64, "AidsMonitoring" + oShell.Run "http://localhost:5503", 1, False WScript.Quit End If -' Uvicorn via pythonw — redirige stdout/stderr al log oShell.Run "cmd /c cd /d """ & sBackend & """ && """ & sPython & """ -m uvicorn main:app --host 0.0.0.0 --port 5503 >> """ & sLog & """ 2>&1", 0, False - -WScript.Sleep 2500 +WScript.Sleep 3000 Set oExec = oShell.Exec("cmd /c netstat -aon | findstr :5503 | findstr LISTENING") sOut = oExec.StdOut.ReadAll() If Len(Trim(sOut)) > 0 Then - MsgBox "AidsMonitoring iniciado correctamente." & vbCrLf & vbCrLf & _ - "URL: http://localhost:5503" & vbCrLf & _ - "Tailscale: http://100.96.43.86:5503", 64, "AidsMonitoring" + oShell.Run "http://localhost:5503", 1, False Else - MsgBox "El servidor tardo en iniciar. Revisa logs\server.log si hay errores.", 48, "AidsMonitoring" + MsgBox "El servidor no respondio. Revisa logs\server.log", 48, "AidsMonitoring" End If