Leaders dynamic_sysop Posted February 5, 2003 Leaders Posted February 5, 2003 hi does anyone know how to use the script control in vb6 or .net? or maybe have a code example? i can add a script control to a form in vb6 and then add text to a textbox saying " msgbox "test" " and hit a button and it makes a messagebox appear, however if i try to add proper code like Dim Socket as such and such , it just comes up with a line error, i'm not sure if there's a particular format for these script controls to recognise/decypher code before it will make a form respond. any help would be appreciated on this ty. Quote
*Gurus* divil Posted February 5, 2003 *Gurus* Posted February 5, 2003 VBScript is not strongly typed, all variables are variants. Therefore you cannot Dim x As Type. I can think of no reason why you would use this control from .NET. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Leaders dynamic_sysop Posted February 5, 2003 Author Leaders Posted February 5, 2003 the reason i want script option is, i build irc clients and want to give people the option to add their own scripts in to them ( mirc does this , ie: you can make a scripts which adds as many sockets as you want it to and then connects them sockets to the places you want, you can also tell mirc to respond to things, like if someone on the irc channel says something which contains profanity, the script triggers off a kick/ban ) basically i want to put out an irc client that people can build upon as they can with mirc. Quote
*Gurus* divil Posted February 5, 2003 *Gurus* Posted February 5, 2003 I wrote an IRC client in .NET which supported full scripting in either VB.NET or C#. Look in to the System.CodeDom and System.CodeDom.Compiler namespaces. If you are serious about developing such a capability the .NET framework offers everything you need to compile on the fly. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Leaders dynamic_sysop Posted February 5, 2003 Author Leaders Posted February 5, 2003 any chance of a copy of the finished project to see how it works? or maybe a snippet of the code for the script engine? i've never seen the System.CodeDom yet so didnt know about any of this. Quote
*Gurus* divil Posted February 5, 2003 *Gurus* Posted February 5, 2003 No. Sorry :) If you have a specific question I will do my best to answer it. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Threads Posted February 6, 2003 Posted February 6, 2003 If you don't end up wanting to write your own like divil did, it is still possible to use the old Microsoft Script Control. Here is a small article about it: http://www.vb2themax.com/Item.asp?PageID=TipBank&Cat=101&ID=535 Quote mov ax, 13h int 10h
Shannara Posted February 8, 2003 Posted February 8, 2003 Hmm, well, I've tried adding in a vsa into my proggie, but Microsoft (in their "wisdom") has no documentation (little = nothing), and no samples on how to use it. Even their newsgroups are BARE. I tried the scripting engine @ http://peisker.de/index.html?http://peisker.de/dotnet/scripting.htm But, its worthless, no way to add in codeitems and execute them, lol. The author refuses to respond to any emails, which renders his scripting engine as useless. So, Im off on my search again for a scripting engine using VSA that will run mutliple scripts, and events, etc.. but sadly, there are currently none. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.