How to identify which computers are in the network

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
userintl2012
Posts: 9
Joined: Fri Apr 13, 2012 8:44 pm

How to identify which computers are in the network

Post by userintl2012 » Sun Sep 29, 2013 4:43 pm

Hi all,
I have an Android only (not iPhone) application that has to copy files from the device to a PC using WI-FI. To copy I'm using the following command:

put myListOfData into URL ( "file:" & myFilename )

where myListOfData is a list comma delimited and myFilename has the complete path to the network computer in my development environment and it was hard-coded into myFilename, like "\\DEVENV\Users\myFile.csv".

It works fine and the file is copied to the networked computer.

The question is: how can I have a list of the computer names in the local network using WI-FI to be able to build the above filename string at runtime?

Thank you for the help!

Paulo

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: How to identify which computers are in the network

Post by Simon » Wed Oct 09, 2013 2:08 am

Hi Paulo,
Have you tried:

Code: Select all

on mouseUp
   get shell("net view /all")
   put it
end mouseUp
Works on Win 7.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

userintl2012
Posts: 9
Joined: Fri Apr 13, 2012 8:44 pm

Re: How to identify which computers are in the network

Post by userintl2012 » Wed Oct 09, 2013 7:59 pm

Hi Simon,
Yes this works fine. However there is no support to command line in the Android neither IOS and the Livecode app is running on devices, not on Windows.

An alternative way, more time consuming, it will be to create a Web Service to expose a list of the computers in the network, retrieved from a database online. Then the Livecode app could access the web service and show the list, asking the Operator/User to pick the one he/she wants to connect.

Anyways thank you very much for your help!

Best,
Paulo

Post Reply