Re: How do you display the IP Address?
Re: How do you display the IP Address?
- Subject: Re: How do you display the IP Address?
- From: Deivy Petrescu <email@hidden>
- Date: Tue, 25 Aug 2009 20:26:32 -0400
On Aug 25, 2009, at 6:52 PM, Stockly, Ed wrote: I've added the clipboard if someone wants to post the information
somewhere, like an email. I would recommend you NOT make changes to a user's clipboard without warning or an option not to do so. If that's an option you want, you could do it this way: Display dialog helpDeskInfo default answer helpDeskInfo Then, a user who wants to copy and paste all or part of the result can do so from the dialog, and those who don't want to won't be surprised when they paste the next time. HTH, ES
I agree.The user should know!
For folks behind a router, the IP address can usually be gotten from the router. This is what I use for a 2Wire Gateway router from AT&T using Lynx.
set theurl to "http://homeportal/xslt?PAGE=B01&THISPAGE=A01&NEXTPAGE=B01" set routerIP to do shell script "/usr/local/bin/lynx -dump " & quoted form of theurl & " | grep -o '[0-9]*\\.[0-9]*\\.[0-9]*\\.[0-9]*' "
Joe Restricting to the (local) IP address question, OMM I have to do : do shell script "ipconfig getifaddr en1" since do shell script "ipconfig getifaddr en0" fails, so my script reads:
on whoami() try return do shell script "ipconfig getifaddr en0" end try try return do shell script "ipconfig getifaddr en1" end try end
Emmanuel
What is wrong with
IPv4 address of (system info)
It gets the IP whether on en0 or en1 or ...
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden