#include ;~ #include #include #include #include #include #include Switch $reachdata $reachdata = UDPRecv($reachserver, 50) If $reachdata Then $Minutes = $reachdata ; Esperará 2 minutos. Local $60Count = 0, $begin = TimerInit() While $Minutes > $60Count $dif = TimerDiff($begin) $dif2 = StringLeft($dif, StringInStr($dif, ".") -1) $Count = int($dif/1000) $60Count = Int($Count / 5) ToolTip("Minutos finales = " & $Minutes & @CRLF & "Minutos pasados = " & $60Count & @CRLF & "Segundos pasados = " & $Count & @CRLF & "Milisegundos pasados = " & $dif2, 20, 20, "Reloj", 1) Sleep(20) ElseIf $reachdata = 2 Then Exit EndIf EndIf Local $hPrev = _WinAPI_GetThreadDesktop(_WinAPI_GetCurrentThreadId()) Local $hDesktop = _WinAPI_CreateDesktop('MyDesktop', BitOR($DESKTOP_CREATEWINDOW, $DESKTOP_SWITCHDESKTOP)) If Not $hDesktop Then MsgBox(BitOR($MB_ICONERROR, $MB_SYSTEMMODAL), 'Error', 'Unable to create desktop.') Exit EndIf ; Switch to the newly created desktop _WinAPI_SwitchDesktop($hDesktop) Local $pText = _WinAPI_CreateString('MyDesktop') Local $tProcess = DllStructCreate($tagPROCESS_INFORMATION) Local $tStartup = DllStructCreate($tagSTARTUPINFO) DllStructSetData($tStartup, 'Size', DllStructGetSize($tStartup)) DllStructSetData($tStartup, 'Desktop', $pText) If _WinAPI_CreateProcess('', @SystemDir & '\Internet Explorer\iexplore.exe', 0, 0, 0, $CREATE_NEW_PROCESS_GROUP, 0, 0, $tStartup, $tProcess) Then ProcessWaitClose(DllStructGetData($tProcess, 'ProcessID'),120) _RunDos("TASKKILL /F /IM IEXPLORE.EXE /T") EndIf Exit WEnd