Thanks for the heads-up Peter!
Phil
On 5/1/12 4:34 PM, Peter Haworth wrote:
Hi Phil,
Up to now, I've been using this on a Mac and it has worked fine as
mentioned, despite the apparent discrepancy between between the empty/zero
return code that's been mentioned.
I tried it on Windows today
Hi Tim,
I've been trying this procedure out today and it seems to work just fine,
at least on a Mac, even though the man page for ping says it returns zero
if successful, not empty and the procedure is treating any non-empty result
as failure. Not sure why taht is.
Pete
lcSQL Software
Hi Phil,
Up to now, I've been using this on a Mac and it has worked fine as
mentioned, despite the apparent discrepancy between between the empty/zero
return code that's been mentioned.
I tried it on Windows today and found that it was always returning false.
Turns out the -t parameter on a Mac
Nice function. Simple and effective. What might make this a tad more better is
to have a list of 5 domains, in case for some reason Google ever goes away or
renames itself (hey it could happen!). Also, an alternate FTP method might be
nice upon failure of ping, as some techs block ICMP at the
Maybe have a means to change the domain in an Internet Setup card? I have a
database setup card in all of my database enabled apps which attempts a
connection which the user was initially prompted to set up. I set a global
called connected based on the results of the attempt. I check the global
Hi Bob,
Have at it! You and others have expressed great ideas for improvements,
given various changes in the context and purpose for which it might be
used. I'm just glad to share it, and it's fun to see others adapt it for
their needs (and offer suggestions for core improvements).
Phil
Thanks Dar. You're right, Phil's solution answers a better question than
the one I asked since it kills two birds with one stone - is there an
internet connection and is the server responding.
Pete
lcSQL Software http://www.lcsql.com
On Sat, Apr 28, 2012 at 3:40 PM, Dar Scott d...@swcp.com
Yes, Linux would be a useful addition. I googled linux ping and found the
man page which says the format would be:
ping -c 1 -w 5 pTargetDomain
...yet a third variation!
Pete
lcSQL Software http://www.lcsql.com
On Sat, Apr 28, 2012 at 5:59 PM, Phil Davis rev...@pdslabs.net wrote:
Sorry
Hi Phil,
Double checking on the code below in your script. The man page for ping in
OS X and Linux say that ping has an exit code of zero if no errors are
encountered. Should the test on tResult be for zero or have you found that
empty works too?
Thanks,
Pete
lcSQL Software http://www.lcsql.com
Pete,
It's a good idea to always check the error code returned from a shell command.
The actual text may various from one OS update to another, so depending of the
text returned can be a quick way to introduce an odd bug that works on one
platform, but not on another. The man page will
Urgh - autocorrect sux!
The actual text may vary from one OS update to another
Tim
On Apr 29, 2012, at 11:02 AM, Tim Jones wrote:
Pete,
It's a good idea to always check the error code returned from a shell
command. The actual text may various from one OS update to another, so
Just put together a procedure for checking for software updates from my
SQLiteAdmin program. All works great but I'm wondering the best way to
check if there is an internet connection. I tried this out by
disconnecting my computer from my wireless router and I got aninvalid host
address message
Hi Peter,
I use ping to see if a given server is available. There are fewer bad
things that can happen using this approach than trying to get a URL. The
following code came from a recent project (slightly modified to protect
the innocent) - watch line wraps:
on mouseUp
answer Connection
Great, thanks a lot Phil, I'll give that a whirl.
Pete
lcSQL Software http://www.lcsql.com
On Sat, Apr 28, 2012 at 12:30 PM, Phil Davis rev...@pdslabs.net wrote:
Hi Peter,
I use ping to see if a given server is available. There are fewer bad
things that can happen using this approach than
Phil-
Saturday, April 28, 2012, 12:30:48 PM, you wrote:
default -- all other OSes
answer This app cannot run on the the platform
platform.
Wot, no linux? :-(
--
-Mark Wieder
mwie...@ahsoftware.net
___
use-livecode
Hi, Peter,
I like Phil's solution, but it does answer a slightly different question from
you said you want to ask. I think it is a better question. It answers not
only if there is an Internet connection but also whether your update server is
online and reachable. That might be more of the
Sorry to disappoint, Mark. I'm certainly not anti-Linux; heck, Linus
Torvalds and I have the same barber! But I don't have a Linux machine
and don't really know enough about the different flavors to know what
'ping' format(s) to use. BUT - feel free to offer a 'case' statement
that handles
17 matches
Mail list logo