Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Online / Offline Status ermitteln
Dieses kleine Script zeigt wie man mit Hilfe der Ermittlung der IP feststellen kann, ob man online oder offline ist. Dieses Vorgehen ist besonders für User mit DialUp Connections interessant.

This script shows how to determine the online / offline state by retrieving the current ip from the internet. It should be of interest when a user has a dialup connection.

  /set default value of timestamp to current time decremented by one year to ensure ip retrieval /
  /also starts when script starts/
  %DefVar(TimeStamp=%Dec(%System.GetDateTime('yyyy'),1)%System.GetDateTime('-mm-dd hh:nnConfuseds:zzz'))

  /insert textmode script code here/

/determine the number of days between last ip retrieval time and current time/
  %Assign(DaysPassed,%System.DateDiff(%TimeStamp(),%System.GetDateTime('yyyy-mm-dd hh:nnConfuseds:zzz'),'MinutesPassed'))
  /calculate fractional days measured in milliseconds to minutes/
  /when at least one day has passed or 5 minutes have passed/
  %If((%DaysPassed() ! 0) OR (%MinutesPassed() >= 5)) Then
     /retrieve ip/
     /store time of ip retrieval/
     %Assign(TimeStamp,%System.GetDateTime('yyyy-mm-dd hh:nnConfuseds:zzz'))
  /online status output/
  %If(%IP() ! '') Then
Current stable version of LCDHype: 0.7.6
New plugin: Notepad++ Bookmark Manager
New music: Nordwise - Empire transition

Forum Jump:

Users browsing this thread: 1 Guest(s)