User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 20 of 20

Thread: Retrieving the computer name of the Host. How!

  1. #11
    No Products Registered

    Join Date
    Mar 2007
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Retrieving the computer name of the Host. How

    but I can connect to a localhost MOOClick server, one that I set up on through the server version of the app I am making? What would the syntax be for that, how would I go about doing that. It's ok if all the computers have to be on to make it work, I can just include instructions that both computers have to be on, and the computer running the server app will have to be connected first. Both apps will look almost exactly alike, the only difference is one will have a button saying "host" the other will have a button saying "connect." All I need is know is what "coding" stuff to put on those two buttons under the MOOClick, or MOOSock, or Network, or whatever and then any other "coding" stuff such as if I have to get the computer name and things like that. That is what I am looking for, what do I put under the "Connect" and "host" buttons to make the two apps communicate. I appreciate everyone's help, you guys really are great. I promise, after I can get this to work, I won't bother you guys anymore, lol.

  2. #12
    No Products Registered

    Join Date
    Mar 2007
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Retrieving the computer name of the Host. How

    what is the standard port for a network? Is it 80? if I used the syntax...on button connect clicked connect to "localhost" on port 80 would that work for the client? Then on the server I have on button host clicked host server on port 80. Do I still have to use the MOOclick function --- on connect sign on to channel "new"

    I have two apps, a client and a server.
    the server has a button that says host, and then the edit boxes like the MOOclick tutorial.

    The client has a button that says connect, and then the edit boxes like the MOOclick tutorial.

    After the user on the server clicks host, should that automatically sign them into the chat since they are the ones who is hosting?

  3. #13
    No Products Registered

    Join Date
    Mar 2007
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Retrieving the computer name of the Host. How

    Jan H, ok if I want to retrieve the key that holds the host's computer name, I tried pasting the -- RegCurKeySZ$( "Registry2", "ComputerName") in the set text to part of my edit box but it gave an error.

    Is there anything I need to do different.

    Here is what I did.

    1. Under the (Start of Frame) event I right click under the (Host Computer Name) edit box.
    2. After I right click I choose editing--->set text.
    3. When the expression box opens, I pasted in --RegCurKeySZ$( "Registry2", "ComputerName")
    4. It gives a syntax error.

    What do I put in the expression box? Thanks for all of your help.

  4. #14
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module

    Join Date
    Jun 2006
    Posts
    375
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Retrieving the computer name of the Host. How

    Before you set the text in the edit box, you have to set the keys first.

    I made a very simple demo. Can be download via thiiiiiiiiiis liiiiiiiiiiiink

    Special thanks to JanH for informing us which keys to use.

  5. #15
    No Products Registered

    Join Date
    Mar 2007
    Location
    Norway
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Retrieving the computer name of the Host. How

    John,

    The string 'RegCurKeySZ$( "Registry2", "ComputerName")' is generated, all but the last entry, when you select Retrieve Data from Object. A registry2 control must already have been added to your frame. I assume typing it in manually (or copy/paste) does the same thing. Metal's demo should make it all clear. Thanks!

    I am not yet familiar with the MooClick thingy, but for all intents and purposes a LAN is like the Internet in that both use TCP/IP. Both machines will have an IP address (as well as a more human friendly host name aka machine name). To find your IP address, select 'Run...' from the Windows start menu, type 'cmd' (no quotes) and hit enter. From the command prompt, type 'ipconfig /all' and hit enter. IP address is one of the lines you should get.

    On a typical LAN (aka Intranet), your IP address would be something like 10.0.0.X or 192.168.0.X or similar reserved ranges. In most networks these days, PCs have a local IP address for the LAN, and the router provides an external, shared IP address which is what the rest of the Internet knows your PC (and other PCs in the network) as. Google up NAT (Network Address Translation) if you want an explanation

    To find what your IP address is from the outside, visit a site like http://whatismyipaddress.com/ This will have no relevance to a LAN-only network app.

    PS: Port 80 is the standard port for http, that is, the web. It is now also used for a heck of a lot of other things, like IM or bittorrent, because it is typically one of the few ports not closed by firewalls. Again, not familiar with MooClick, but while port 80 is all good, it IS already used by any web server which may be running on people's PCs (IIS, Apache, etc), so I'm not sure it would be necessarily safe to use it as standard for a chat app. Better leave that as a choice for the user, but for testing, it should be fine.

  6. #16
    No Products Registered

    Join Date
    Mar 2007
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Retrieving the computer name of the Host. How

    Metal and Jan, you guys are absoulutely great! I am at work, I work late today, but as soon as I get home, I will give this a try. I was able to finally get the program to work last night, but I had to "hardcode" the machine name into the client app. example: {Connect to "JohnsComp" on Port 1203}

    This seemed sufficient to get it to connect, but it wouldn't be feasible for other networks, because not everyone has the hosting computer called "JohnsComp" lol. So what I am looking at doing now is setting up the keys, and then setting the text to display what ever the hosts computer name is. They then have to provide that information to the other users on the network. The client app will then fill that into an edit box, and then it will be something like, {Connect to $editbox1 on port 1203} I know the syntax is wrong for the editbox, lol, I was just using that as an example, since I have only been using this program for 2 days, lol.

    Thanks again, I can't wait to try out the demo! You guys really are great.

  7. #17
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator ProPatch Maker
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DJFuego's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    1,416
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Retrieving the computer name of the Host. How

    No one thought of hostname>c:\mypc.txt then; or piping out hostname?

  8. #18
    No Products Registered

    Join Date
    Mar 2007
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Retrieving the computer name of the Host. How

    Dj how would you set that up?

  9. #19
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator ProPatch Maker
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DJFuego's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    1,416
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Retrieving the computer name of the Host. How

    run the command "hostname>c:\mypc.txt" then read the c:\mypc.txt into an edit object; Tadaaaah or use the pipe object to record what hostname outputs.
    you can put ">" at the end of 'Dos' commands and then type the path name of the file you want to output.

  10. #20
    No Products Registered

    Join Date
    Mar 2007
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Retrieving the computer name of the Host. How

    Hi guys, ok I am still having a heck of time with this. Has anyone been able to create two very simple chat programs, one that is a Server and the other a Client, that will communicate through only a network, and not relying on the actual internet. I need this to be generic in that it will work on any network and not hardcoded to work on only a certain one. If anyone can do create these two very simple programs and then post the source I would forever be grateful. I think if I can see it in action then I might be able to figure this out. Thanks.

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Where did host go?
    By Humbugle in forum Lacewing
    Replies: 18
    Last Post: 23rd July 2009, 09:49 PM
  2. Local host
    By Skeets in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 17th June 2008, 12:14 AM
  3. Cannot host 2 servers on 1 PC?
    By Blizna in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 17th February 2007, 12:24 PM

Posting Permissions

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