BatchHacker

AutoHotKey "URL Launcher" (Internet Checker)

Jul 29th, 2014
432
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoTrayIcon
  2. If ConnectedToInternet() {
  3.     Gui, Add, Text, x2 y10 w30 h20 , URL:
  4.     Gui, Add, Edit, x2 y30 w280 h20 vLink ,
  5.     Gui, Add, Button, x282 y30 w60 h20 , Open
  6.     Gui, Font, S6,
  7.     Gui, Show, x475 y488 h60 w347, URL Launcher
  8.     Return
  9.     ButtonOpen:
  10.     GuiControlGet, Link
  11. If Exist, "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
  12. Run, "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "%Link%"
  13. else
  14. Run %Link%
  15. Return
  16.     GuiClose:
  17.     ExitApp
  18.     }
  19. else
  20.    Msgbox, 48, WinInet.dll, Internet is Offline!
  21.    ExitApp
  22. Return
  23. ConnectedToInternet(flag=0x40) {
  24. Return DllCall("Wininet.dll\InternetGetConnectedState", "Str", flag,"Int",0)
  25. }
  26. #IfWinActive URL Launcher
  27. Enter::
  28. GuiControlGet, Link
  29. sleep, 3000
  30. Return
Advertisement
Add Comment
Please, Sign In to add comment