| Message |
Ah OK I see what you are doing. That file constants.vbs is not supposed to be directly used as your script file. If you make a plugin it is included as part of the plugin, to give you various helpful names inside your scripts.
For example, take this line:
const eTimerAlreadyExists = 30018 ' Attempt to add a timer that already exists
Now after doing an AddTimer you might get back an error code. You could either say:
if error = 30018 then
' could not add timer
endif
Or, if you used the constants file, you could say:
if error = eTimerAlreadyExists then
' could not add timer
endif
The second one is slightly better documentation basically.
Unless you want to use all the names in constants.vbs I would ignore it, and simply make a blank script file (or no script file at all, and just do "send to script").
For more details about that see:
http://mushclient.com/scripting
However if you want to use the constants inside a script file, just omit the XML stuff at the start and the end, like this:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Constants For use in VB scripting -->
<!DOCTYPE script>
<script>
<![CDATA[
.......... keep the rest of the file up to the last 2 lines ........
]]>
</script>
If you copy and paste the stuff excluding what I have in bold above, then that is ordinary VBscript, and you could paste it into the start of your new, empty, script file.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|