forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


VDSWORLD Chat Checker Utility

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Source Code
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Feb 16, 2004 12:34 am    Post subject: VDSWORLD Chat Checker Utility Reply with quote

VDSWORLD Chat Checker Utility 1.0

This utility uses the VDSGUI.DLL by CodeScript to display a popup by the
tray icon which is non-intrusive. It uses the new chat DATA.PHP script,
which can be found at http://forum.vdsworld.com/chat/data.php . Please
see the script for additional details on the data.php script functions.

The script uses API code by Skit3000 to check the data.php without having
to download it to your computer first.

Please feel free to post any modifications in this thread! Very Happy
NOTE: This script must be compiled to work entirely proper. I'll see if
I can get a compiled version uploaded soon.

Screenshot:


Code:
title VDSWORLD Chat Checker

# Script by FreezingFire
# Built in part by PGWARE
# VDSGUI Extension by CodeScript
# WININET API Code by Skit3000

if @equal(%1,ShowChatWin)
  %%SubFunc = True
  external vdsbrw50.dll
  DIALOG CREATE,VDSWORLD Chat,-1,0,450,190
  DIALOG ADD,BROWSER,BROWSER1,0,0,450,190,http://forum.vdsworld.com/chat/
  DIALOG SHOW
  goto evloop
end 
  external vdsgui.dll,DEMO
  #define command,gui
  #define function,gui
  #define function,wininet

  DIALOG CREATE,ChatCheckTrayWnd,,,,,CLASS ChatCheckTrayWnd

  gui subclass,#ChatCheckTrayWnd
  gui option,taskicontipclick,on
  gui option,taskiconcrashrecovery
 
  :TaskIconCrashed
  GUI ADD,TASKICON,TASKICON1,#ChatCheckTrayWnd,5,VDSWORLD Chat Checker
  %%LastID = @wininet(http,get,http://forum.vdsworld.com/chat/data.php)
 
  :Evloop
  if %%SubFunc
    wait event
  else
    wait event,10
  end
  goto @event()

  :timer
  %A = @wininet(http,get,http://forum.vdsworld.com/chat/data.php)
  if @not(@equal(%A,%%LastID))
    %%LastID = %A
   gosub Notify
  end
  goto evloop
 
  :Notify
  %M = @wininet(http,get,http://forum.vdsworld.com/chat/data.php?request=lastmessage)
  parse "%%id;%%author;%%message",%M
  gui set,taskicon,taskicon1,#ChatCheckTrayWnd,balloontip,1,New chat post by %%author,%%message
  exit
   
  :TaskIcon1CLICK
  if @equal(@GUI(CLICK,B),RIGHT)
    DIALOG POPUP,Show Chat Window|Show Last Chat Post|-|Exit
  end
  goto evloop

  :Show Last Chat PostMENU
  gosub Notify
  goto evloop
 
  :Show Chat WindowMENU
  :TaskIcon1TIPCLICK
  shell open,%0,ShowChatWin
  goto evloop

  :ExitMENU
  :Close
  if %%SubFunc
    exit
  else
    gui remove,taskicon,taskicon1,#ChatCheckTrayWnd
    gui unsubclass,#ChatCheckTrayWnd
  end
  exit
 
:wininet
  # Function by Skit3000
  if @equal(%1,"http")
    loadlib wininet.dll
    if @equal(%2,"setheader")
      %%HTTP_HEADER = %3
      exit
    end
    %%Buffer =
    %%INTERNET_SERVICE_FTP = 1
    %%INTERNET_SERVICE_GOPHER = 2
    %%INTERNET_SERVICE_HTTP = 3
    %%INTERNET_PRECONFIG = 0
    %%INTERNET_DIRECT = 1
    %%INTERNET_PROXY = 3
    %%INTERNET_FLAG_RELOAD = $80000000
    %%Document =
    %%ref = "VDSWORLD Chat Checker"
    if @equal(%2,"GET")
      %%Method = "GET"
      elsif @equal(%2,"POST")
        %%Method = "POST"
        else
          %%Method = %2
        end
        %%Site = %3
        if @equal(@substr(%%Site,1,7),"HTTP://")
          %%Site = @strdel(%%Site,1,7)
        end
        if @unequal(@pos(/,%%Site),0)
          %%Document = @substr(%%Site,@pos(/,%%Site),@len(%%Site))
          %%Site = @strdel(%%Site,@pos(/,%%Site),@len(%%Site))
        end
        %%HandleOpen = @lib(wininet.dll,InternetOpenA,INT:,STR:%%ref,INT:%%INTERNET_PRECONFIG,STR:,STR:,INT:0)
        if @unequal(%%HandleOpen)
          %%HandleConnect = @lib(wininet.dll,InternetConnectA,INT:,INT:%%HandleOpen,STR:%%Site,INT:80,STR:,STR:,INT:%%INTERNET_SERVICE_HTTP,INT:0,INT:0)
          if @unequal(%%HandleConnect)
            %%HandleHTTP = @lib(wininet.dll,HttpOpenRequestA,INT:,INT:%%HandleConnect,STR:%%Method,STR:%%Document,NIL:,NIL:,NIL:,%%INTERNET_FLAG_RELOAD,0)
            if @unequal(%%HandleHTTP)
              %B = %%HTTP_HEADER
              %%TempVar = @lib(wininet.dll,HttpAddRequestHeadersA,INT:,INT:%%HandleHTTP,STR:%B,INT:@len(%B),INT:$80000000$10000000)
              if @unequal(@lib(wininet.dll,HttpSendRequestA,INT:,%%HandleHTTP,NIL:,0,NIL:,0))
                repeat
                  %x = @binary(dword,0)
                  %y = @fill(1,,Z)
                  %%TempVar = @lib(wininet.dll,InternetReadFile,INT:,INT:%%HandleHTTP,@addr("%y"),INT:1,@addr("%x"))
                  %%Buffer = %%Buffer%y
                until @equal(@val(%x),0)
                else
                end
                %%TempVar = @lib(wininet.dll,InternetCloseHandle,INT:,%%HandleHTTP)
                else
                end
                %%TempVar = @lib(wininet.dll,InternetCloseHandle,INT:,%%HandleConnect)
                else
                end
                %%TempVar = @lib(wininet.dll,InternetCloseHandle,INT:,%%HandleOpen)
                else
                end
                freelib wininet.dll
                exit @trim(%%Buffer)
              end
            exit

_________________
FreezingFire
VDSWORLD.com
Site Admin Team


Last edited by FreezingFire on Mon Feb 16, 2004 3:35 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Feb 16, 2004 1:18 am    Post subject: Reply with quote

Credits:
Script by FreezingFire
Built in part by PGWARE
VDSGUI Extension by CodeScript
WININET API Code by Skit3000

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Mon Feb 16, 2004 3:38 am    Post subject: Reply with quote

Nice Utility Smile
Thanks FF Very Happy

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Mon Feb 16, 2004 1:28 pm    Post subject: Reply with quote

Could there be uploaded a compiled version? I don't have a registrated version of the VDS GUI dll, so I can't use it with the nice layout... Sad
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Feb 16, 2004 5:32 pm    Post subject: Reply with quote

A version has been compiled for public usage:
http://www.vdsworld.com/index.php?page=download&fileid=390

This version uses vdsipp for the most compatibility. It also uses vdsgui
for the alert tray tips. Smile

Compiled Version Credits:
  • Script by FreezingFire & PGWARE
  • VDSGUI Extension by CodeScript
  • VDSIPP Extension by PGWARE

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Source Code All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group