Forum Discussion

linda_20017's avatar
linda_20017
New Contributor
9 years ago

Code Complete window does not display for VBScript methods, etc

Code Completion window displays for objects, functions, etc, related to the application being tested, but does not display for VBScript, does not show parameters for e.g. MsgBox i.e. MsgBox(prompt[, buttons][, title][, helpfile, context]) and doesn't automatically display statements such as If, While...  I am not a developer/coder, I know a little VB.Net therefore chose VBScript, but I really need code completion (intellisense) to help me writing code. 

I've made sure that the Auto Pop-up option is selected and have checked that all supplied Extensions and Script Extensions are enabled in TestComplete (from the File menu).

 

Does TestComplete not provide this functionality or am I doing something wrong?

  • dmiscannon's avatar
    dmiscannon
    Frequent Contributor

    The code completion window displays for me for VB script by pressing <ctrl><space>. If and While are available in the window. Regarding MsgBox, use aqDlg.MessageDlg method (https://support.smartbear.com/viewarticle/68841/?q=messagedlg#_ga=1.16863417.1015556109.1449503065) to display message boxes. Remember that VB Script is similar to but different from and not as powerful as VB.net. Like you, I am not a developer and know a little VB.net, but I have been able to learn enough VB Script over the past couple of years to get by with what I need to accomplish. A good reference is located at https://msdn.microsoft.com/en-us/library/t0aew7h6.aspx. Good luck.

    • linda_20017's avatar
      linda_20017
      New Contributor

      Thanks dmiscannon for the response, encouragement and the link.

       

      Just to be clear, if you were to type the following:

      sub testLeft

      dim leftString

         leftstring = left("Hello World",4)

         I = mkset(mbOK)

         I = builtin.MessageDlg(leftstring,mtinformation,1,0)

      end sub

      Does the Code Complete window display and show you the arguments for 'left' when you type "left("  (note: without the quotation marks)? 

      • linda_20017's avatar
        linda_20017
        New Contributor

        Have realised, that while the Code Complete window doesn't display automatically (as I believe it should) for e.g. 'Left' function, it does display, as dmiscannon suggested, when I press <ctrl> + <space>.

        Thanks again.