Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Atom on February 08, 2003, 07:07 AM

Title: Msscript control help
Post by: Atom on February 08, 2003, 07:07 AM
Ok, i want to use VbScript for Custom Commands, i know how to execute a code from the users's vbscript, but i dont know how to put arguments into it.

For example, i know how to execute the VbScript sub called
Blah()

But i do not know how to execute
Blah(blah, blah, blah)
Title: Re: Msscript control help
Post by: Grok on February 08, 2003, 08:39 AM
Call Blah
he can help.

You have a couple options depending on whether it is a sub or a function returning a value, and if you want the value.


No paramters:
    Blah
-or-
    Call Blah

With paramters
    Blah pOne, pTwo, pThree
-or-
    Call Blah(pOne, pTwo, pThree)
-or to get return value if function-
    lretval = Blah(pOne, pTwo, pThree)

HTH.
Title: Re: Msscript control help
Post by: Atom on February 08, 2003, 09:18 AM
nm i found the problem, i was using executecode instead of run, grok you must have misunderstood my question im sorry i was being stupid, feel free to remove this topic
Title: Re: Msscript control help
Post by: Noodlez on February 08, 2003, 12:21 PM
while were on the subject, say the script has a variable

like,
strName = "Noodlez"
how would you get the value of strName?
Title: Re: Msscript control help
Post by: Mesiah / haiseM on February 08, 2003, 05:08 PM
Do you mean when you declare the variable in the script, or have it hardcoded before runtime?
Title: Re: Msscript control help
Post by: ILurker on February 08, 2003, 05:18 PM
If you have put

Option Explicit
Dim strName

in the top of the form source, and some where in the form, you have put strName = "whatever here"then if you want to get the value, you would need an object to get it with. for example,

textbox.text = strName
Title: Re: Msscript control help
Post by: Mesiah / haiseM on February 08, 2003, 05:21 PM
lol, hes referring to using the scripting control which is common VB code during runtime, not something hardcoded before runtime.
Title: Re: Msscript control help
Post by: Noodlez on February 08, 2003, 05:31 PM
QuoteIf you have put

Option Explicit
Dim strName

in the top of the form source, and some where in the form, you have put strName = "whatever here"then if you want to get the value, you would need an object to get it with. for example,

textbox.text = strName

not only is this not what im talking about, but it's incorrect. since when do you need an object to check the value of a string?