• Welcome to Valhalla Legends Archive.
 

Msscript control help

Started by Atom, February 08, 2003, 07:07 AM

Previous topic - Next topic

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)
I am back! aINC is dead, ThinkTank PRO is alive.
VB, JAVA, ASM, C, its all yummy to me.

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.


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.

Atom

#2
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
I am back! aINC is dead, ThinkTank PRO is alive.
VB, JAVA, ASM, C, its all yummy to me.

Noodlez

#3
while were on the subject, say the script has a variable

like,
strName = "Noodlez"
how would you get the value of strName?

Mesiah / haiseM

#4
Do you mean when you declare the variable in the script, or have it hardcoded before runtime?
]HighBrow Innovations
Coming soon...

AIM Online Status: 

ILurker

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

Mesiah / haiseM

#6
lol, hes referring to using the scripting control which is common VB code during runtime, not something hardcoded before runtime.
]HighBrow Innovations
Coming soon...

AIM Online Status: 

Noodlez

#7
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?