Which hub software is the best? Where can I find script XXX? Discuss it here...(no, this is not for advertising your hub...)
Moderator: Moderators
-
Marv
- Posts: 2
- Joined: 2003-08-17 00:40
- Location: 44
Post
by Marv » 2003-08-17 01:03
sorry if this has been answered before but i can't find it.
is there, or could any of you amazing minds out there plez write me, a script to send out a series of messages at timed intervals on a dc hub,
e.g. maybe four different messages to be sent out at 15 mniute intervals
thnkx, Marv
hub: uks.no-ip.com
web:
http://uks.150m.com
web:
http://uks.no-ip.info/index.htm
-
HaArD
- Posts: 147
- Joined: 2003-01-04 07:20
- Location: Canada http://hub-link.sf.net
Post
by HaArD » 2003-08-17 05:42
Wow... that takes me back... I modified/enhanced that one a bit....
Code: Select all
' InfoBot by HaArD
' Version 1.0
' April 14, 2003
'
' This script will send a message, contained in a text file, to Main Chat every 'n' minutes.
' Inspired and based on a script written by Shadowtek.
Dim sBotName, iMinutes, sFileName
Sub main()
sBotName = "InfoBot"
iMinutes = 1 'Set the time between message broadcast to 120 minutes (2 hours)
sFileName = "Message.txt" 'By default this file should be placed in the same dir as DC Hub.exe
'To use a different location specify the full path ie. "C:\Textfiles\Message.txt"
tmrScriptTimer.interval = 60000 'Set The Timer Interval to 1 minute
tmrScriptTimer.enabled = True
End Sub
Sub tmrScriptTimer_Timer()
If tmrScriptTimer.tag = "" Then
tmrScriptTimer.tag = "0"
End If
tmrScriptTimer.tag = clng(tmrScriptTimer.tag) + 1
If clng(tmrScriptTimer.tag) => iMinutes Then
tmrScriptTimer.tag = "0"
colUsers.SendChatToAll CStr(sBotName), ReadFile(sFileName)
End If
End Sub
Function ReadFile(sFileName)
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(sFileName) Then
Set file = fso.OpenTextFile(sFileName,1,True)
ReadFile = file.ReadAll
file.Close
Else
ReadFile = "Message file not found..."
End If
End Function
-
Marv
- Posts: 2
- Joined: 2003-08-17 00:40
- Location: 44
Post
by Marv » 2003-08-17 16:09
thnkx guys...i've never done it before but i'll try to change it to pick-up 1 of 4 rotating files.
thnkx again.
Users browsing this forum: Google [Bot] and 0 guests