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 » Sun Aug 22, 2010 3:54 am

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: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Networked PCs

Post by mwieder » Sun Aug 22, 2010 6:36 am

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 » Sun Aug 22, 2010 1:22 pm

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 » Sun Aug 22, 2010 8:59 pm

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 » Sun Aug 22, 2010 9:04 pm

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 » Sun Aug 22, 2010 11:01 pm

: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 » Mon Aug 23, 2010 2:54 am

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 » Mon Aug 23, 2010 12:01 pm

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