Valhalla Legends Forums Archive | Battle.net Bot Development | Msscript control help

AuthorMessageTime
Atom
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)
February 8, 2003, 1:07 PM
Grok
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.

[pre]
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)
[/pre]
HTH.
February 8, 2003, 2:39 PM
Atom
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
February 8, 2003, 3:18 PM
Noodlez
while were on the subject, say the script has a variable

like,
[code]strName = "Noodlez"[/code]

how would you get the value of strName?
February 8, 2003, 6:21 PM
MesiaH
Do you mean when you declare the variable in the script, or have it hardcoded before runtime?
February 8, 2003, 11:08 PM
ILurker
If you have put

[code]Option Explicit
Dim strName[/code]

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

[code]textbox.text = strName[/code]
February 8, 2003, 11:18 PM
MesiaH
lol, hes referring to using the scripting control which is common VB code during runtime, not something hardcoded before runtime.
February 8, 2003, 11:21 PM
Noodlez
[quote]If you have put

[code]Option Explicit
Dim strName[/code]

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

[code]textbox.text = strName[/code][/quote]

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?
February 8, 2003, 11:31 PM

Search