Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Suggestions
➜ Tcl scripting
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #15 on Wed 14 May 2003 03:22 AM (UTC) |
| Message
| OK, fine, however it will still crash.
It crashes on "Initialise parse interface..." which is sequentially somewhat before where it attemps to do "Test script...". |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #16 on Wed 14 May 2003 03:45 AM (UTC) |
| Message
| I tested it, and it crashes as I expected. I would expect BTW that on a syntax error I would get a nice error message, after all syntax errors would be common enough, and should not cause "catastrophic failure" or an access violation.
Meanwhile, perhaps you can interpret the "message box" idea into Tcl for me. How would I create a COM object (like in the examples in the other languages) or put up a message box? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Metaxy
(28 posts) Bio
|
| Date
| Reply #17 on Wed 28 May 2003 06:46 AM (UTC) |
| Message
|
Quote: In article <dbb6dfe6.0305132012.402608d3@posting.google.com>,
Alex <stopm@attbi.com> wrote:
>Everything after this line is Nick's words.
>
>I have done a minimal test file that, in a single file, demonstrates
>the problem. Copy between the lines and paste into (say) test.cpp and
>compile under Microsoft Visual C++.
You didn't mention what version of tcom you are using. The Tcl Active
Script engine in the tcom distribution is still in an experimental
state. The tcom-3.9b8.zip beta version from the
http://www.vex.net/~cthuang/tcom/ Web site includes an update to the
Tcl Active Script engine. | | Top |
|
| Posted by
| Metaxy
(28 posts) Bio
|
| Date
| Reply #18 on Fri 06 Jun 2003 01:51 AM (UTC) |
| Message
| | Any luck with the other version? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #19 on Fri 06 Jun 2003 06:34 AM (UTC) |
| Message
| The test program doesn't crash, however you haven't replied to my earlier question about how to do, say, a message box, so all I can say is that it doesn't crash, not that it does anything very spectacular.
However MUSHclient still does crash, bearing in mind that the exact same code works fine for the other 4 scripting languages.
I think it is a bit obscure to have to download tcl from ActiveState and then add in bits and pieces from other sites, I doubt everyone will want to do that.
I'll take another look in a few days. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Metaxy
(28 posts) Bio
|
| Date
| Reply #20 on Fri 06 Jun 2003 04:51 PM (UTC) Amended on Fri 06 Jun 2003 05:56 PM (UTC) by Metaxy
|
| Message
| Here you go:
set WshShell [tcom::ref createobject WScript.Shell]
$WshShell popup "Hello, world" 0 "test"
| | Top |
|
| Posted by
| Metaxy
(28 posts) Bio
|
| Date
| Reply #21 on Sun 02 May 2004 11:41 PM (UTC) |
| Message
| I'm gonna bump this thread, because there appear to be new versions of TCom since a year ago:
http://www.vex.net/~cthuang/tcom/
I think it's long enough that mentioning it again wouldn't be that annoying ;) | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #22 on Tue 04 May 2004 10:10 PM (UTC) |
| Message
| | I'll take a look. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #23 on Tue 25 May 2004 06:44 AM (UTC) |
| Message
| | So have you tried TCL with the latest MUSHclient? TCL is an option in the scripts drop-down menu, so you could try it and let me know how it goes. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Metaxy
(28 posts) Bio
|
| Date
| Reply #24 on Thu 17 Jun 2004 12:33 AM (UTC) |
| Message
| I installed TCOM and registered TclScript. When I try it with a script with just a comment, no actions (the most bug-proof test of all ;), I get
"Error -2147467263 occurred when getting script engine dispatch pointer:
Not implemented"
| | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #25 on Thu 17 Jun 2004 12:50 AM (UTC) |
| Message
| Sounds like it is not fully implemented. The exact same code works for other languages, here is the part in question ...
// set state to started
if (ShowError (m_IActiveScript->SetScriptState (SCRIPTSTATE_STARTED),
"starting script engine"))
return true;
// connect outbound objects (ie. world)
if (ShowError (m_IActiveScript->SetScriptState (SCRIPTSTATE_CONNECTED),
"connecting script engine"))
return true;
// get script engine dispatch pointer
if (ShowError (m_IActiveScript->GetScriptDispatch (0, &m_pDispatch),
"getting script engine dispatch pointer"))
return true;
It got through everything (starting, connecting) until getting the dispatch pointer (which is needed to call scripts). That was the last thing it had to do. The same code works for Perl, Python, VBscript, JScript.
Sounds like TCL is not ready yet. :)
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Metaxy
(28 posts) Bio
|
| Date
| Reply #26 on Thu 17 Jun 2004 01:50 AM (UTC) |
| Message
| | Do you get the same behavior when you test it yourself? Or did you just put it in and leave me to try it without any tests? ;) | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #27 on Thu 17 Jun 2004 02:51 AM (UTC) |
| Message
| I left it for you. :)
I am reluctant to keep installing all these additional script engines. Do you think I'll get different results? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Metaxy
(28 posts) Bio
|
| Date
| Reply #28 on Fri 18 Jun 2004 02:54 AM (UTC) |
| Message
| Configuring Tcl seems to be a pain, I'm learning COM stuff and I might try it myself and tell you how if I figure it out. Feel free to take it out for now ;)
If you mean other languages, I think it's pretty reliable on average. Though there aren't that many commonly used languages that you haven't already done <g> | | 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.
89,504 views.
This is page 2, subject is 2 pages long:
1
2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top