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 Forum Check-Up tool

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


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Thu Aug 01, 2002 4:59 am    Post subject: VDSWORLD Forum Check-Up tool Reply with quote

Use the following script to check for new messages at VDSWORLD at a specified
interval. It is recommended to compile the script. Normally the program will only
show a taskicon in the system tray.

Left-click for an options screen, right-click to close the script. In the options screen
an interval can be set ranging from 2 minutes up to 30 minutes. There's also a
setting for automatically launching the program on boot-up.

A message box will appear in case there's any new message. It allows you to
decide whether to view the message directly or later.

If there are multiple new messages within a single interval, it would still be
required to login to check for new messages, as the script will only inform you
about the last message in a an interval.

The script requires vdsipp.dll to be available.

Here's a new version already, which could also notify you on file updates, after
that's enabled in the options screen.

In this new version 1.2 a problem has been fixed with pressing Cancel in the
options dialog and then showing the options dialog again. Skit, your idea of an
ontop dialog is good, but I didn't implement it in this version as it loses the look
and feel of the default Windows question dialog.


Code:

  rem version 1.2
  rem works in VDS 3 and 4.

  title VDSWORLD Check-Up

  directory change,@path(%0)
  external vdsipp.dll

  internet http,create,1
  internet http,threads,1,off
  internet http,protocol,1,1
  internet http,useragent,1,"VDSWORLD Forum Check-Up"

  %%launch = @regread(default,,launch,)
  %%interval = @regread(default,,interval,5)
  %%lastpost = @regread(default,,lastpost,)
  %%lastfile = @regread(default,,lastfile,)
  %%forumnotify = @regread(default,,forumnotify,1)
  %%filenotify = @regread(default,,filenotify,)

  %%icon = %0
  if @equal(@ext(%%icon),dsc)
    %%icon =
  end
  DIALOG CREATE,VDSWORLD Check-Up,-1,0,289,192
  DIALOG ADD,TASKICON,taIcon,%%icon,VDSWORLD Check-Up
  DIALOG ADD,GROUP,gSettings,4,4,280,144,Settings
  DIALOG ADD,CHECK,chAutoLaunch,24,16,256,16,&Launch with Windows
  DIALOG ADD,CHECK,chForumNotify,48,16,256,16,Notify on &forum updates
  DIALOG ADD,CHECK,chFileNotify,72,16,176,16,Notify on f&ile updates
  DIALOG ADD,TEXT,tInterval,96,16,,,Update interval:
  DIALOG ADD,COMBO,cInterval,116,16,56,21,cInterval,,LIST
  DIALOG ADD,TEXT,tMinutes,120,88,,,minutes
  DIALOG ADD,BUTTON,bOK,160,96,80,24,&OK
  DIALOG ADD,BUTTON,bCancel,160,192,80,24,&Cancel
  list loadtext,cInterval
"2
"5
"10
"30
  goto timer
:bCancelbutton
:evloop
  wait event,@prod(%%interval,60)
  goto @event()
:timer
  internet http,get,1,http://www.vdsworld.com/data.php
  %%data = @trim(@internet(http,content,1))
  if %%data
    parse "%%topic;%%post;%%file;%%filetitle;%%fileauthor",%%data
    %%update =
    if %%lastpost
      if @not(@equal(%%post,%%lastpost))
        if %%forumnotify
          if @ask(There's a new post on the VDSWORLD forum. Would you like to view it now?@cr()@cr()"(please hold shift while clicking "@chr(34)"yes"@chr(34)" to open in a new window)")
            shell open,http://www.vdsworld.com/forum/viewtopic.php?t=%%topic#%%post
          end
        end
        %%update = 1
      end
    else
      %%update = 1
    end
    if %%update
      %%lastpost = %%post
      registry write,default,,lastpost,%%lastpost
    end

    %%update =
    if %%lastfile
      if @not(@equal(%%file,%%lastfile))
        if %%filenotify
          if @ask(There's a new file available on VDSWORLD. Would you like to download it now?@cr()@cr()"The file is named '"%%filetitle"' and was submitted by "%%fileauthor".")
            shell open,http://www.vdsworld.com/index.php?page=download&fileid=%%file
          end
        end
        %%update = 1
      end
    else
      %%update = 1
    end
    if %%update
      %%lastfile = %%file
      registry write,default,,lastfile,%%lastfile
    end
  end
  goto evloop
:taIconclick
  if @equal(@click(B),left)
    dialog set,chAutoLaunch,%%launch
    dialog set,chForumNotify,%%forumnotify
    dialog set,chFileNotify,%%filenotify
    %x = @match(cInterval,%%interval)
    dialog showmodal
    goto evloop
  else
    goto close
  end
:bOKbutton
  %%launch = @dlgtext(chAutoLaunch)
  %%forumnotify = @dlgtext(chForumNotify)
  %%filenotify = @dlgtext(chFileNotify)
  %%interval = @dlgtext(cInterval)
  registry write,default,,launch,%%launch
  registry write,default,,forumnotify,%%forumnotify
  registry write,default,,filenotify,%%filenotify
  registry write,default,,interval,%%interval
  if %%launch
    if @not(@equal(@ext(%0),dsc))
      registry write,local,SOFTWARE\Microsoft\Windows\CurrentVersion\Run,VCheckUp,%0
    end
  else
    registry delete,local,SOFTWARE\Microsoft\Windows\CurrentVersion\Run,VCheckUp
  end
  goto evloop
:close
  if @ask(This will close the Check-Up program. Do you want to continue?)
    internet http,destroy,1
    exit
  else
    goto evloop
  end



Last edited by Tommy on Thu Aug 01, 2002 8:16 pm; edited 3 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Skit3000
Admin Team


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

PostPosted: Thu Aug 01, 2002 12:28 pm    Post subject: Reply with quote

Eeeh.... where is the &amp stuff for???? Maybe you should only use & ???
Or is that a bug of the [code:1:3c8cc72d0d] tag???


Last edited by Skit3000 on Thu Aug 01, 2002 12:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Aug 01, 2002 12:52 pm    Post subject: Reply with quote

The & is the HTML equivalent for the & sign. In the case of the VDS tag, it converts the &'s into &'s...

Look at the code below:
Code:

rem This is a comment & I put an "and sign" in it which got converted into &.
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Aug 01, 2002 12:54 pm    Post subject: Reply with quote

By the way, Tommy, I think that code is a great idea! Smile

I've been wondering how to check for new posts forever!!

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
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: Thu Aug 01, 2002 1:00 pm    Post subject: Reply with quote

I've tried before to make a program like this, but it didn't work... I tried to check http://forum.vdsworld.com/ but the dll (vdsinet) gives a 404 error, so I stopped working on it...

But I like this!!!
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Thu Aug 01, 2002 4:40 pm    Post subject: Reply with quote

I use to have a program for the old forum, but never released it since the forum software changed and I didn't have the time to try another one on this new forum.

Little forum checkers come in seriously handy!

Thanks Tommy Smile



-Garrett
Back to top
View user's profile Send private message
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Thu Aug 01, 2002 7:57 pm    Post subject: Reply with quote

My script uses an online script especially set up for this, so that simplifies things for
the script. Wink

If you want to make your own equivalent, you could simply download from
http://www.vdsworld.com/data.php, but it is important to specify "VDSWORLD
Forum Check-Up" as user agent. It'll return the information like this:
<topic id of newest post>|<newest post id>|<newest file id>|<title of newest
file>|<author of newest file>

If you want to read directly from the forum, use the URL
http://www.vdsworld.com/forum/ rather than http://forum.vdsworld.com/ which is
a forwarding page.

Don't use the VDSINET DLL for HTTP access as it doesn't support HTTP V1.1 so that
it doesn't work with virtual domains.

Tommy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Skit3000
Admin Team


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

PostPosted: Thu Aug 01, 2002 8:00 pm    Post subject: Reply with quote

I think it's more handy if you make a Dialog that's ontop then that INFO-box, cause if you are working with multiply windows and you are just switching, you will loose that info-box...

Code:

:timer
  internet http,get,1,http://www.vdsworld.com/data.php
  %%data = @trim(@internet(http,content,1))
  if %%data
    parse "%%topic;%%post;%%file;%%filetitle;%%fileauthor",%%data
    %%update =
    if %%lastpost
      if @not(@equal(%%post,%%lastpost))

rem This is the new stuff

if %%forumnotify

DIALOG CREATE,VDSWORLD Check-Up,-1,0,395,62,ONTOP,SMALLCAP
DIALOG ADD,TEXT,TEXT1,0,88,,,There is a new post on the VDSWORLD Forum...
DIALOG ADD,TEXT,TEXT2,16,16,,,Press TAB if you press YES if you want to open the forum in a new window...
DIALOG ADD,BUTTON,Yes,32,104,64,24,Yes
DIALOG ADD,BUTTON,No,32,208,64,24,No
DIALOG SHOW
wait event
if @equal(@event(),yes)
  shell open,http://www.vdsworld.com/forum/viewtopic.php?t=%%topic#%%post
  else
  goto evloop
  end      
end
Back to top
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Thu Aug 01, 2002 10:50 pm    Post subject: Reply with quote

Code:
if @equal(@event(),yes)

Should be:
Code:
if @equal(@event(),yesbutton)

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 3 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