Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Applescript > Re: Can Applesc...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 11 Topic 1557 of 1611
Post > Topic >>

Re: Can Applescript tell if computer is online?

by Sander Tekelenburg <user@[EMAIL PROTECTED] > Jan 4, 2008 at 05:58 AM

In article 
<384431b0-3178-4239-a376-410395b0abfd@[EMAIL PROTECTED]
>,
 biz@[EMAIL PROTECTED]
 wrote:

> On Jan 4, 12:56 am, Sander Tekelenburg <u...@[EMAIL PROTECTED]
> wrote:

[...]

> >  set theResult to (do shell script "curl -Ihttp://ww.google.com")

That's not what I posted. Look carefully at my origial text. You removed 
a space -- an essential one (as all characters are, in programming ;)).

Either you somehow messed up the quoting manually, or your newsclient 
(Google apparently), screwed things up. Given that your quoting habit 
sucks anyway, my bet is that Google is to blame. I suggest you upgrade 
to a real newsclient. Plenty of options: <http://www.newsreaders.com/>.

In article 
<847897e1-6163-4631-a1b2-89b74e839355@[EMAIL PROTECTED]
>,
 biz@[EMAIL PROTECTED]
 wrote:

> I GOT IT! Thanks alot. Just had to change the wording a bit (if
> contains "google" then...) and now it works fine. Thanks again

You're welcome, but your change makes it less reliable. There is no 
guarantee that the result will contain the string "google". That string 
just happens to be in what Google's servers output today, and only for 
certain addresses, and very likely only to certain IP addresses, etc.

What I posted is far more reliable. If it doesn't work, you're running 
something else than what I posted. (Every character counts, so be 
careful when copy&pasting code -- especially beware of linewraps 
introduced by newsclients, newsservers, etc.)

-- 
Sander Tekelenburg, <http://www.euronet.nl/~tekelenb/>

Mac user: "Macs only have 40 viruses, tops!"
PC user: "SEE! Not even the virus writers support Macs!"




 11 Posts in Topic:
Can Applescript tell if computer is online?
biz@[EMAIL PROTECTED]   2007-12-31 19:22:34 
Re: Can Applescript tell if computer is online?
Sander Tekelenburg <us  2008-01-01 18:50:28 
Re: Can Applescript tell if computer is online?
biz@[EMAIL PROTECTED]   2008-01-02 05:38:29 
Re: Can Applescript tell if computer is online?
iterate4@[EMAIL PROTECTED  2008-01-03 00:00:15 
Re: Can Applescript tell if computer is online?
Jolly Roger <jollyroge  2008-01-02 18:20:28 
Re: Can Applescript tell if computer is online?
biz@[EMAIL PROTECTED]   2008-01-02 17:14:25 
Re: Can Applescript tell if computer is online?
Sander Tekelenburg <us  2008-01-03 14:56:24 
Re: Can Applescript tell if computer is online?
biz@[EMAIL PROTECTED]   2008-01-03 16:13:55 
Re: Can Applescript tell if computer is online?
Sander Tekelenburg <us  2008-01-04 05:58:56 
Re: Can Applescript tell if computer is online?
Jolly Roger <jollyroge  2008-01-03 23:14:15 
Re: Can Applescript tell if computer is online?
biz@[EMAIL PROTECTED]   2008-01-03 17:05:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri May 16 22:27:57 CDT 2008.