SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Feb 2007
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    vbYesNo vbscript and Silktest

    script:

    Hello,

    I am trying to use a vbscript with Silktest, and I am having an issue:

    Silktest script:
    LIST OF STRING lsOutput
    SYS_Execute("cscript c:\helper.vbs")
    ListPrint(lsOutput)

    vbscript:
    Function BigFunction()
    BigFunction = CBool(1)
    '------------------------->This part doesnt work<---
    Msgbox("Is this ok?", VbYesNO, "Ok")
    '------------------------->If I change it to this, it works<
    Msgbox("Is this ok?")
    end Function
    WScript.StdOut.WriteLine BigFunction()

    If I change the Msgbox to Msgbox("Is this ok?") with no additional arguments, it works fine, but I need it to be a vbYesNo messagebox.

    Can anyone give me ideas on this?

  2. #2
    Senior Member
    Join Date
    Feb 2003
    Location
    FL, USA
    Posts
    3,646
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: vbYesNo vbscript and Silktest

    Have you tired using the "alternate" numerical representation for VbYesNo - if I recall correctly this is 4.
    Lynne

    I have not failed. I've just found 10,000 ways that won't work" --Thomas Edison

  3. #3
    Junior Member
    Join Date
    Feb 2007
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: vbYesNo vbscript and Silktest

    Yes, and it doesnt work.

  4. #4
    Senior Member
    Join Date
    Feb 2003
    Location
    FL, USA
    Posts
    3,646
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: vbYesNo vbscript and Silktest

    Have you tried without the Parenthesis?

    Msgbox "Is this ok?", VbYesNO, "Ok"
    Lynne

    I have not failed. I've just found 10,000 ways that won't work" --Thomas Edison

  5. #5
    Junior Member
    Join Date
    Feb 2007
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: vbYesNo vbscript and Silktest

    That part works, but now when I try to control the flow based on the response, the whole thing bombs out again. This is frustrating:

    This works:
    Msgbox "Is this ok?", VbYesNO, "Ok"
    This doesnt:
    dim test = Msgbox "Is this ok?", VbYesNO, "Ok"

  6. #6
    Senior Member
    Join Date
    Feb 2003
    Location
    FL, USA
    Posts
    3,646
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: vbYesNo vbscript and Silktest


    In VBScript the msgbox statement changes depending on how it is used.


    Msgbox "Is this ok?", VbYesNO, "Ok"

    dim test = Msgbox ("Is this ok?", VbYesNO, "Ok")

    I am not familiar with Silktest but it should give you some of this information in the help files or user guide - if it does not you might find the site http://www.w3schools.com/vbscript/vb..._functions.asp helpful for VBS help.
    Lynne

    I have not failed. I've just found 10,000 ways that won't work" --Thomas Edison

  7. #7
    Junior Member
    Join Date
    Feb 2007
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: vbYesNo vbscript and Silktest

    Understood, but doing it this way
    dim test = Msgbox ("Is this ok?", VbYesNO, "Ok")

    Takes me back to the first problem

  8. #8
    Senior Member
    Join Date
    Feb 2003
    Location
    FL, USA
    Posts
    3,646
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: vbYesNo vbscript and Silktest

    If I were doing this in straigh DB I would do teh following:

    dim test

    test=MsgBox("Is this ok?", VbYesNO, "Ok")
    Lynne

    I have not failed. I've just found 10,000 ways that won't work" --Thomas Edison

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 03:56 AM.

Copyright BetaSoft Inc.