Is skype connected to some IP\'s?


/ Published in: Pseudocode
Save to your folder(s)



Copy this code and paste it in your HTML
  1. ; Show network connections between your machine and others.
  2.  
  3. isRunning(processName) {
  4. Process, Exist, processName
  5. tmp := ErrorLevel
  6. if tmp > 0:
  7. return tmp
  8. else
  9. return 1
  10. }
  11.  
  12. getConnections() {
  13. status :=
  14. Run %comspec% /c ""C:\Windows\System32\netstat.exe" "-o" > "netstatus.txt""
  15. FileRead, status, netstatus.txt
  16. FileDelete, netstatus.txt
  17. Return, status
  18. }
  19.  
  20. translateOutputToGlobals(connectionString) {
  21. Global
  22. StringTrimLeft, formatted, connectionString, 100
  23. ArrayCount = 0
  24. Loop, Parse, formatted, `n, `r
  25. {
  26. if StrLen(A_LoopField) > 20
  27. {
  28. ArrayCount += 1
  29. Array%ArrayCount% := A_LoopField
  30. }
  31. }
  32. }
  33.  
  34.  
  35. Gui, Add, Text,, % "Skype is running (X = pid of skype, 1 = no): " isRunning("skype.exe")
  36. Gui, Add, ListView, r20 w700, INFO
  37. translateOutputToGlobals(getConnections())
  38. Loop %ArrayCount%
  39. {
  40. el := Array%A_Index%
  41. LV_Add("", el)
  42. }
  43. Gui, Show

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.