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!
What I am trying to do is take this information and locate the line that starts with IPv4 and put the right value of this line into a new variable that I can display on a field label of my stack. Once I can work this out for WIndows, I will do the same thing for Linux and be able to post the function back to public domain.
---
Graham Pearson
Goshen, IN USA
We Are Closed Today is your single internet resource for Indiana Area School Closings, Visit http://www.weareclosedtoday.com
i think this is part of glx application framework by blue mangos trevor devore. it's open source and so maybe you can take the version in there out, and edit or enhance it?
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
While reading information from this framework, I discovered a command that might be able to get me the right information. The command is matchText however, I am stuck right now on the regular expressions.
I did find a sample of code which will display the mac address
get matchText(temp,"Physical Address[\. ]*: ([A-Z0-9-]*)",retVal)
In this example I replaced Physical Address with IPv4 Address and struggling on what to put within the () to get the 4 sections of the ip address. Any Ideas
---
Graham Pearson
Goshen, IN USA
We Are Closed Today is your single internet resource for Indiana Area School Closings, Visit http://www.weareclosedtoday.com
function getConnectionIP theConnection
put shell("ipconfig /all") into myData
filter myData with ("*" & theConnection & "*")
set the itemDel to colon
return item 2 of myData
end getConnectionIP
Best regards,
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
function getConnectionIP theConnection
put shell("ipconfig /all") into myData
filter myData with ("*" & theConnection & "*")
set the itemDel to colon
return item 2 of myData
end getConnectionIP
Is their a way to view the information from the filter command in an answer line. As I learn RR I am trying to use a practical application which allows me to grasp the concepts better.
now my next line is answer information myData which returns a blank window. If I look in a command prompt ipconfig /all I show a line that has IPv4 and after the colon has 172.27.14.55
---
Graham Pearson
Goshen, IN USA
We Are Closed Today is your single internet resource for Indiana Area School Closings, Visit http://www.weareclosedtoday.com
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