MSGbox in VBS that updates with value of variable

后端 未结 4 1074
别那么骄傲
别那么骄傲 2020-12-02 00:44

Just wondering how i could have a MSgbox that displays the value of a variable as it constantly changes. Basically a number has one added to it everytime it loops. I want to

4条回答
  •  臣服心动
    2020-12-02 01:31

    This script will display how many loops it took and the value of a variable during the loop, and display the results in 1 message box after the loop is complete.

    Dim RateOfChange, roc, watchvariable : roc = 1 : watchvariable = 1
    
    for i=1 to 25
        watchvariable = (watchvariable * i) * 16
        RateOfChange = RateOfChange & "Iteration[" & roc & "]" & " - Value[" & watchvariable & "]" & vbcrlf
        roc = roc + 1
    next
    
    'NOTE uncomment this below to activate msgbox. 
    'msgbox rateofchange
    wscript.echo rateofchange
    

提交回复
热议问题