Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8

Thread: Vbs to asp ??

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Vbs to asp ??

    I have a vbs script when I run at the dos prompt creates rooms in our chat client. How can Is it possible to convert the vbs file to asp so we can create the rooms using a web page?

    Vbs file
    set theObj = CreateObject("HotComm.CRManager")

    If theObj.RoomExists("MoeXP") Then
    WScript.Echo "Room MoeXP Exists"
    Else
    WScript.Echo "Room MoeXP Does Not Exist"
    End If

    theArray = theObj.GetRoomList()
    If IsArray(theArray) Then
    For x = LBound(theArray,1) To UBound(theArray,1)
    WScript.Echo "Room '"&theArray(x)&"'"
    Next
    End If

    If theObj.CreateRoom("TestRoom","owner@hc.com","123","abc","a1",11448,140,5,50) Then
    WScript.Echo "Room Creation Succeeded"
    Else
    WScri

    Thanks!

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    You'll have problems with this:
    CreateObject("HotComm.CRManager")

    That object has to exist on the server, and it has to be allowed to create it.
    You may need to set that up with your IIS admin.

    And change any wshell/wscript objects. They are for windows shell.
    Use response.write to echo out stuff to the browser.

    The client/server thing is different from an all client application. You may run into other "gotchas".

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #3
    Registered User
    Join Date
    Aug 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by nikkiH
    You'll have problems with this:
    CreateObject("HotComm.CRManager")

    That object has to exist on the server, and it has to be allowed to create it.
    You may need to set that up with your IIS admin.

    And change any wshell/wscript objects. They are for windows shell.
    Use response.write to echo out stuff to the browser.

    The client/server thing is different from an all client application. You may run into other "gotchas".
    Thanks forthe info! Were can I find info on were to find how to create an object on server 2003?

    Thanks,
    Ken

  • #4
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    A little digging on other 3rd party libraries shows install exe files that usually do the setup.
    An example...

    Do you have the installer for that application?

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #5
    Registered User
    Join Date
    Aug 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have the install file but some files were changed to alllow the vbs file to create the rooms. If I find out what files create the rooms is there an easy way to set them up like an OBDC?

  • #6
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    You've lost me on that one.
    ODBC is for database interaction.
    I have no idea what "Creating a room" really means.
    I think you may be comparing apples to oranges...not sure though.

    Your goal is to get that object installed on IIS, then you won't have to change that part of the code a bit.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #7
    Registered User
    Join Date
    Aug 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What I was referring to when I said an easy way like ODBC was like setting up a DNS to connect a database. All I have to do is set it up and then the asp script know were to go when I use is Conn = DSN=dnsname;UID=user;PWD=password;DATABASE=database"

    Is there a admin utility that I can use to create objects to be linked to the chat application? When I use set theObj = Server.CreateObject("HotComm.CRManager") I receive this error:
    error '80004005'
    /test2.asp, line 13
    Line 13 id the CreateObject line.

  • #8
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Yeah, once you get it installed, you can just instantiate it.
    And no, I don't know of any tool to do it.
    Read the article I linked for hints. It will be application specific, since it involves registry changes.
    You should really try to find the installer, though.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •