Passing a value

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David

    #1

    Passing a value

    Hopefully, this will not be as bad as passing a kidney stone. :-)

    Anyone know how to pass a value from a VB6 exacutable to a VBScript file (*.vbs)?

    David
  • Bob Butler

    #2
    Re: Passing a value

    dhodgkins@chest nut.org (David) wrote in message news:<83b47ff1. 0404010724.4419 7e0f@posting.go ogle.com>...[color=blue]
    > Hopefully, this will not be as bad as passing a kidney stone. :-)
    >
    > Anyone know how to pass a value from a VB6 exacutable to a VBScript file (*.vbs)?[/color]

    if you pass the argument on the command line the WScript.Argumen ts
    collection can be used in the script to get the info

    Comment

    • David

      #3
      Re: Passing a value

      butlerbob@earth link.net (Bob Butler) wrote in message news:<fa10fb0.0 404022012.ce512 b5@posting.goog le.com>...[color=blue]
      > dhodgkins@chest nut.org (David) wrote in message news:<83b47ff1. 0404010724.4419 7e0f@posting.go ogle.com>...[color=green]
      > > Hopefully, this will not be as bad as passing a kidney stone. :-)
      > >
      > > Anyone know how to pass a value from a VB6 exacutable to a VBScript file (*.vbs)?[/color]
      >
      > if you pass the argument on the command line the WScript.Argumen ts
      > collection can be used in the script to get the info[/color]

      How do I declare that in my script file? I am just using Notepad.

      Comment

      • Bob Butler

        #4
        Re: Passing a value

        dhodgkins@chest nut.org (David) wrote in message news:<83b47ff1. 0404042018.2cb4 089d@posting.go ogle.com>...[color=blue]
        > butlerbob@earth link.net (Bob Butler) wrote in message news:<fa10fb0.0 404022012.ce512 b5@posting.goog le.com>...[color=green]
        > > dhodgkins@chest nut.org (David) wrote in message news:<83b47ff1. 0404010724.4419 7e0f@posting.go ogle.com>...[color=darkred]
        > > > Hopefully, this will not be as bad as passing a kidney stone. :-)
        > > >
        > > > Anyone know how to pass a value from a VB6 exacutable to a VBScript file (*.vbs)?[/color]
        > >
        > > if you pass the argument on the command line the WScript.Argumen ts
        > > collection can be used in the script to get the info[/color]
        >
        > How do I declare that in my script file? I am just using Notepad.[/color]

        dim oArgs, sArgs
        Set oArgs = WScript.Argumen ts
        For x = 0 To oArgs.Count - 1
        sArgs = sArgs & " " & oArgs(x)
        Next
        Set oArgs = Nothing
        msgbox sArgs

        Comment

        • David

          #5
          Re: Passing a value

          butlerbob@earth link.net (Bob Butler) wrote in message news:<fa10fb0.0 404050540.56168 0f@posting.goog le.com>...[color=blue]
          > dhodgkins@chest nut.org (David) wrote in message news:<83b47ff1. 0404042018.2cb4 089d@posting.go ogle.com>...[color=green]
          > > butlerbob@earth link.net (Bob Butler) wrote in message news:<fa10fb0.0 404022012.ce512 b5@posting.goog le.com>...[color=darkred]
          > > > dhodgkins@chest nut.org (David) wrote in message news:<83b47ff1. 0404010724.4419 7e0f@posting.go ogle.com>...
          > > > > Hopefully, this will not be as bad as passing a kidney stone. :-)
          > > > >
          > > > > Anyone know how to pass a value from a VB6 exacutable to a VBScript file (*.vbs)?
          > > >
          > > > if you pass the argument on the command line the WScript.Argumen ts
          > > > collection can be used in the script to get the info[/color]
          > >
          > > How do I declare that in my script file? I am just using Notepad.[/color]
          >
          > dim oArgs, sArgs
          > Set oArgs = WScript.Argumen ts
          > For x = 0 To oArgs.Count - 1
          > sArgs = sArgs & " " & oArgs(x)
          > Next
          > Set oArgs = Nothing
          > msgbox sArgs[/color]


          Thanks, that did the trick!

          David

          Comment

          Working...