Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

a lil more VB help lads :/

  • 13-11-2003 2:50pm
    #1
    Registered Users, Registered Users 2 Posts: 4,946 ✭✭✭


    Right heres the code im using, addressin being the txtfile that you enter an address to connect to a cs server and passwordin being the password (if there is on on the server)
    Private Sub connect_Click()
    Dim sMyVar As String
    sMyVar = " +connect " & CStr(addressin.Text) & " +password " & CStr(passwordin.Text)
    Shell ("C:\Program Files\Steam\SteamApps\MYEMAIL\counter-strike\hl.exe" & sMyVar)
    End Sub

    so, when i use forexample

    "C:\Program Files\Steam\SteamApps\myemail\counter-strike\hl.exe" +connect cs.irelandcs.com

    in start->run, it opens cs and connects to the server, but when i use that code above i get 'could not find filesystem dll to load', then i have to close the program. if i mix about the code, i get an 'error 53' message!

    Lads, this is really starting to get under my skin, although im a complete newbie at this, i think that a simple command line to execute a game should be simple enough. I know a fair bit of java, so i can understand how to do it, but it just wont work for me!

    If i used ("C:\Program Files\Steam\SteamApps\MYEMAIL\counter-strike\hl.exe +connect cs.irelandcs.com +password") i get that error with filesystem again... so i think its just me having to eliminate the gap from 'program' and 'files' in the 'program files' folder.

    Please give us a hand here if you can

    Cheers

    reD


Comments

  • Registered Users, Registered Users 2 Posts: 4,196 ✭✭✭deadl0ck


    Just use the short name of Program Files

    It's usually
    progra~1

    You can double check by going to the COmmand prompt and typeing:

    C:
    dir p*. /x


    and you'll see the short name for program files


    Also, what are the correct parameters that the hl.exe program expects ?


  • Registered Users, Registered Users 2 Posts: 4,946 ✭✭✭red_ice


    "C:\Program Files\Steam\SteamApps\myemail\counter-strike\hl.exe" +connect cs.irelandcs.com

    it expects to see that!

    What i was trying to do (as you can see) is have that cmd line, with +connect, and outside that then have + addressin as a variable so i can connect to other servers using the one program.

    When i use that line up there in run it works perfect, but within my program its a differnet matter alltogether.


  • Registered Users, Registered Users 2 Posts: 4,946 ✭✭✭red_ice


    just tried

    Private Sub Command1_Click()
    Shell ("C:\progra~1\Steam\SteamApps\skeme69@hotmail.com\counter-strike\hl.exe")
    End Sub

    on a cmd button and got 'could not find filesystem dll to load' again.. it wont even open the game


  • Registered Users, Registered Users 2 Posts: 4,196 ✭✭✭deadl0ck


    Try:

    Shell ("\"C:\Program Files\Steam\SteamApps\MYEMAIL\counter-strike\hl.exe\"" & sMyVar)

    Note the \" so the quotes get added to the COmmandLine

    Also - you can download Filemon to monitor your system and see Exactly what file the OS is trying to run. It's an excellent program !


  • Registered Users, Registered Users 2 Posts: 200 ✭✭DecTenToo


    Dependancy problem? One of the references might be missing or incorrect in the vb app?

    What's the actual errror message when you try it out?


  • Advertisement
  • Closed Accounts Posts: 7,230 ✭✭✭scojones


    The gap between program and files does not matter afaik. Copy hl.exe to the root of the C directory and try it from there. c:\hl.exe I'm suspecting that the @ is giving you trouble.


  • Registered Users, Registered Users 2 Posts: 200 ✭✭DecTenToo


    Beat me to it. Shell doesn't allow for the concept of a default working directory, so it can't find the dll you need. Either copy the file, explicitly add the file location to the path or environment settings or try this

    http://www.planet-source-code.com/vb/timeout/SessionTimeout.asp?txtReturnUrl=/vb/scripts/ShowCode.asp&txtParms=txtCodeId=11


  • Registered Users, Registered Users 2 Posts: 4,946 ✭✭✭red_ice


    yea i tried creating a shortcut from the HL folder to the C drive so it was c:/HL.exe, but i get a 'runtime error 53' message.

    i can send you the file if you want to have a look, but i dont think that its much use unless you have cs with steam installed. I have about 10 different versions each of which have their own designated folder for referencing! im trying everything and trying them 3/4 times over!

    Really does get to me :/


  • Registered Users, Registered Users 2 Posts: 4,196 ✭✭✭deadl0ck


    You could try running cmd.exe and passing the hl.exe and its parameters to cmd.exe Type cmd /? at the command prompt to get all the cmd parameters


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    try
    Shell ("C:\Program Files\Steam\SteamApps\MYEMAIL\counter-strike\hl.exe" & " " & _ 
    sMyVar) 
    ' Note the additional space between hl.exe 
    ' and the arguments string
    

    I've a feeling thats what it is. Error number '53 usually means the file in the path passed to shell hasn't been found, and is not a dependecy thing.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    If it is the above what you could have done is put the path to hl.exe in a variable too. That way you'd have
    
    sHLPath = "C:\Program Files\Steam\counter-strike\hl.exe"
    sMyVar = "blah blah" 
    
    Shell(sHLPath & sMyVar)
    

    The advantage to this approach is you can use debug.print (in the immediate window) to read whats being passed in the variables. e.g.
    debug.print sHLParth & sMyVar
    
    this would have returned, from the example above, 'C:\Program Files\Steam\counter-strike\hl.exeblah blah'. The bug is more obvious this way.


Advertisement