Jump to content

Recommended Posts

Posted

Hey,

I was wanting to make something to see how many times i got disconnected in 24 hours. How would i go about doing this?

<{POST_SNAPBACK}>

Disconnected from what?...... internet?
Posted

Without further information I asume you are talking about DSL. So, to check how often you got disconnected by your ISP, just monitor your IP Adr. To get the "real" one (natted) parse the output of http://www.whatip.com/

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Posted

well, that means nothing to my dad, i was wanting a script to count how many times i get discconected from the iternet a day. Like a little bubble down on my task bar saying how long its been and how many times.

Posted

well, that means nothing to my dad, i was wanting a script to count how many times i get discconected from the iternet a day. Like a little bubble down on my task bar saying

Well, you need to write script for this!! I was just giving you an idea how to even check if you got disconnected. Now it's your turn to make the script for your daddy.

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Posted

Well, you need to write script for this!! I was just giving you an idea how to even check if you got disconnected. Now it's your turn to make the script for your daddy.

Cheers

Kurt

<{POST_SNAPBACK}>

Well i dont even know how ill do this.
Posted (edited)

Well i dont even know how ill do this.

Hm.. do you know how to program in any language? If not, it will be a long, but interesting way for you. If you know how to program, here is a piece of code to start with. However, now GUI, no Tray, no nifty blinking stuff. I leave that up to you....

$last_ip = _GetMyIP()
$nChanges = 0

while 1
  $current_ip = _GetMyIP()
  if $current_ip <> $last_ip then
     $last_ip = $current_ip
     $nChanges = $nChanges + 1
  endif 
  sleep(5000)
  msgbox(4096,"", "Changes: " & $nChanges)
wend


func _GetMyIP()

  local $URL = "http://www.showmyipeurope.com/xml/"
  local $xmldoc = ObjCreate("Microsoft.XMLDOM")
  $xmldoc.async=false
  $xmldoc.load($URL)
  for $x in $xmldoc.documentElement.childNodes
      if $x.NodeName = "ip" then
        return $x.text
      endif
  next
  return 0
endfunc

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Posted (edited)

[edit]

damn nice _GetIp func dude. but i dont think he has COM :(

(still im gonna use it. since its way faster then the standard one)

[/edit]

something like this should work. but since i do not have a dsl line that fucks up, i was unable to test it.

#include <inet.au3>

dim $old = _GetIP()
dim $times = 0
dim $new

While 1
    
$new = _GetIP()

If $new <> $old Then
    $times += 1
    $old = $new
    TrayTip('DSL', 'disconnected: ' & $times & '.', 1)
EndIf
    
    Sleep(30000)
    
WEnd
Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Posted

just check how many times your ip changes with like _getIp()

_getIP ?? Damn... I should read the help file more often. I just "reinvented" the wheel :(

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Posted

the old wheel was made from wood and was square.

yours is metal and has spinners in em :(.

Thanks for the flowers, but I just translated some others code (VBSCRIPT) into AutoIT syntax. :(

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...