How to Pass Variable?

前端 未结 2 1361
清歌不尽
清歌不尽 2020-12-12 06:54

I create code like following. I want to pass the variable rand and randd in the

iret = iim2.iimPlay(\"rand\")
iret = iim1.iimPlay(         


        
相关标签:
2条回答
  • 2020-12-12 07:46

    Remove the quotes:

    iret = iim2.iimPlay(rand)
    iret = iim1.iimPlay(randd)
    

    VBScript does not expand variables in quotes, so "rand" is passed as the literal string "rand" instead of the value of the variable rand.

    0 讨论(0)
  • 2020-12-12 07:47

    Short answer: remove the quotes like this:

    iret = iim2.iimPlay(rand)

    iret = iim1.iimPlay(randd)

    You are passing strings called "rand" and "randd". Variables aren't encased in quotes. In addition, you are constructing the same object (iret) twice, I'm not sure why. You may have other issues as well, but this is a good start.

    0 讨论(0)
提交回复
热议问题