Advertisement
Guest User

Untitled

a guest
Jun 18th, 2017
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.42 KB | None | 0 0
  1. HotKeySet("{ESC}","close")
  2.  
  3. pingpong()
  4.  
  5. Func pingpong()
  6.  
  7.    While True
  8.  
  9.       $ping=ping("8.8.8.8",3000)
  10. ;~    $ping =
  11.       $s = string($ping)
  12. ;~    ConsoleWrite($s)
  13.  
  14.       if $ping = 0 Then
  15.          $i=ToolTip("N/A",0,0)
  16.          $H_TOOLTIP1 = WinGetHandle($s)
  17.          DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $H_TOOLTIP1, "wstr", "", "wstr", "")
  18.          DllCall("user32.dll", "int", "SendMessage", "hwnd", $H_TOOLTIP1, "int", 1043, "int", 000, "int", 0)
  19.  
  20.       ElseIf 1 <= $ping < 250 Then
  21.          $i=ToolTip($s&" ms",0,0)
  22.          $H_TOOLTIP1 = WinGetHandle($s)
  23.          DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $H_TOOLTIP1, "wstr", "", "wstr", "")
  24.          DllCall("user32.dll", "int", "SendMessage", "hwnd", $H_TOOLTIP1, "int", 1043, "int", 0255255, "int", 0)
  25.  
  26.       ElseIf 250 < $ping < 750 Then
  27.          $i=ToolTip($s&" ms",0,0)
  28.          $H_TOOLTIP1 = WinGetHandle($s)
  29.          DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $H_TOOLTIP1, "wstr", "", "wstr", "")
  30.          DllCall("user32.dll", "int", "SendMessage", "hwnd", $H_TOOLTIP1, "int", 1043, "int", 2550255, "int", 0)
  31.  
  32.       ElseIf 750 < $ping Then
  33.          $i=ToolTip($s&" ms",0,0)
  34.          $H_TOOLTIP1 = WinGetHandle($s)
  35.          DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $H_TOOLTIP1, "wstr", "", "wstr", "")
  36.          DllCall("user32.dll", "int", "SendMessage", "hwnd", $H_TOOLTIP1, "int", 1043, "int", 00255, "int", 0)
  37.       EndIf
  38.  
  39.       Sleep(500)
  40.  
  41.    WEnd
  42.  
  43. EndFunc
  44.  
  45.    Func close()
  46.       Exit
  47.    EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement