[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  Delay function in VBScript

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Delay function in VBScript
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Heathen   (8 posts)  [Biography] bio
Date Thu 09 Sep 2004 07:09 PM (UTC)  quote  ]
Message
Just found the world.queue function, works like a charm.

Thanks,

-Heathen
[Go to top] top

Posted by Heathen   (8 posts)  [Biography] bio
Date Thu 09 Sep 2004 06:34 PM (UTC)  quote  ]
Message
Because what I'm reading in is a script file which frequently uses ( ) symbols and errors out the speedwalk system. I tried what you sugested without success for that reason :-\

-Heathen
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Thu 09 Sep 2004 06:30 PM (UTC)  quote  ]
Message
Why dont you just use the speedwalk queue? Its delay is in ms.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Heathen   (8 posts)  [Biography] bio
Date Thu 09 Sep 2004 05:44 PM (UTC)  quote  ]
Message
I'm doing a simple 'read from file and output to mud' script, that's no problem at all, however, I want to be able to add a delay between each line being sent to the MUD, however, I'd like to be able to do it by milliseconds rather than seconds (which is what I'm doing at the moment). Here's what I have right now:

Alias: readfile * *

dim nST, nTT, nX
dim objFS
dim objTS
dim file
set objFS = CreateObject("Scripting.FileSystemObject")

if objFS.FileExists(world.getinfo (57) & "%1") then

set objTS = objFS.OpenTextFile(world.getinfo (57) & "%1")

do until objTS.AtEndOfStream

world.sendimmediate objTS.ReadLine

nST=Second(Now)
nTT=nST + %2
if nTT>=60 then nTT=nTT-60
do
nST=Second(Now)
loop until nST>=nTT

loop

else

world.colournote "red", "black", "This file doesn't exist in your worlds folder."

end if

(Send to script of course)

Any thoughts? I've seen several examples in VB using the rundll32 library to put the application in freeze for a certain amount of time but not only do they not work, that's not exactly what I'm after.

Thanks,

-Heathen
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


11,174 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]