passing a variable in vbs to vb.net

Author Message
elyegoh

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 12/14/2008
  • Status: offline
passing a variable in vbs to vb.net Sunday, December 14, 2008 5:00 PM (permalink)
0
Hi I am new to visual basic and visual basic script and would need your advice.
 
I would need to know how you pass a variable from visual basic script to vb.net.
 
 
here's an excerpt of my script
 
    Dim l_hh
     l_hh =  "$11$11$11$11$11$11$11$11"
    Dim l_seatA
    Dim l_seatB
    Dim l_seatC
    Dim l_seatD
    Dim l_detect
    Dim l_output
    Dim l_att1
    Dim l_att2
    Dim l_att3
    Dim l_att4
    l_card = 0
    l_seatA=0
    l_seatB=0
    l_seatC=0
    l_seatD=0
         l_output = "The avaliable piority seats are: "

      if(l_detect =0)then
        '-- Disconnect and reconnect (to make speed change available)
    Mx.Disconnect
    Output.Text = "Reconnection in progress... "
    If Not Mx.Connect Then
      Output.Text = vbTab & "Reconnection error, abord procedure"
      Exit Sub
    End If
    Output.Text = vbTab & "Coupler reconnected"

    While not Mx.SelectCard(&H30, &H07, l_sTypeSN)
        '-- Do nothing
    Wend
   '-- Output.Text = "Block number 7 value : "
    For l_indBlock = 7 to 7
        Mx.ReadBlock l_indBlock, 1, l_sBlock
       '-- Output.Text = vbTab & "Block " & l_indBlock & " value : " & l_sBlock
 
        if(l_sBlock =l_hh)then
        l_detect=1
        else
        output.text = "You are not authorise to use this!"
        end if
    Next
 
 
 
 
The variable that I want to pass to vb.net is l_detect=1
 
I would really appreciate if you guys can help me with this...
 
Thank you =)
 
#1
    ginolard

    • Total Posts : 1347
    • Scores: 23
    • Reward points : 0
    • Joined: 8/11/2005
    • Status: offline
    RE: passing a variable in vbs to vb.net Sunday, December 14, 2008 9:40 PM (permalink)
    0
    Easy.

    Have you VB.NET program accept command line switches.  Then, have the script run the executable passing the variable to it as a command line switch
    Author of ManagePC - http://managepc.net

     
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9