Networked PCs

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
deebee
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 89
Joined: Mon Jul 19, 2010 6:59 am

Networked PCs

Post by deebee »

Is it possible to get and return the names of PCs on a local network? I've checked the docs and looked at the global variables list but couldn't find any thing on the subject.
mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3582
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Networked PCs

Post by mwieder »

does this do the trick for you?

Code: Select all

put shell("net view")
Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Networked PCs

Post by Mark »

Hi Deebee,

Could tell us a little more about what you want to do? I could help you with a simple broadcasting script. You could use such a script to find all copies of your application on a network, for example. An app of mine that does this is Clipboard Link. Although you are talking about "PC's", I could imagine that you want to find Windows, Mac OS X as well as Linux machines.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
deebee
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 89
Joined: Mon Jul 19, 2010 6:59 am

Re: Networked PCs

Post by deebee »

mwieder,
I'm totally green to programming so I'll have to try that after work tonight.
Thanks!

Mark,
I'm just trying to get the names of the computers on the LAN to store them into an array or variables. Windows only, as I'm just trying to reinvent the wheel and do my own GUI to send commands to windows shutdown. I figured it might be something fairly simple to do to help me learn a bit.
Thanks!
Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Networked PCs

Post by Mark »

But, Deebee, why do you want that? Just for the fun of displaying the names?!

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
deebee
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 89
Joined: Mon Jul 19, 2010 6:59 am

Re: Networked PCs

Post by deebee »

:lol: Nope, i'd like to put them in a string to send to shutdown.exe. Or at least try to. :) I'd like to make something similar to shutdown -i.
deebee
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 89
Joined: Mon Jul 19, 2010 6:59 am

Re: Networked PCs

Post by deebee »

mwieder wrote:does this do the trick for you?

Code: Select all

put shell("net view")
This actually accomplishes what I want, thank you!
Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Networked PCs

Post by Mark »

Thanks for explaining, Deebee. It always helps to know what people are trying to achieve.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Post Reply