image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old October 9th, 2003, 03:07 PM
Registered User
 
Join Date: Dec 2002
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
MakGeek is on a distinguished road
Question Can AppleScript do this?

I am trying to get applescript to checck and see if there are any active network ports before it continues with the script. Does any when have any insight on if this is possible?

Background: The script I use connects to a server that i use to backup, and I use iCal to schedule when to run it. But the problem is I only want it to run the script if it is connected to a network. I hate error messages popping up.
Reply With Quote
  #2  
Old October 9th, 2003, 03:23 PM
brianleahy's Avatar
Colonel Panic
 
Join Date: Sep 2000
Location: Northern Ohio
Posts: 1,579
Thanks: 0
Thanked 0 Times in 0 Posts
brianleahy is on a distinguished road
I don't know a way to check for network ports - though there probably is one.

However, you could just use a try/error/end try structure instead. It might be simpler.
__________________
OS X 10.4
G5 Dual 2GHZ / 160GB / 1GB RAM / Superdrive
Apple 20" Cinema Display
SmartDrive 120GB Firewire HD
Maxtor 250GB SATA


Visit my wife's eBay store !!

http://stores.ebay.com/Catchy-Creations-by-brendaonline

Now pining for a MacBook Pro...
Reply With Quote
  #3  
Old October 9th, 2003, 04:01 PM
Pengu's Avatar
Digital Music Pimp
 
Join Date: Nov 2002
Location: Um.. Here.
Posts: 1,591
Thanks: 0
Thanked 0 Times in 0 Posts
Pengu is on a distinguished road
i have no real experience with applescript, but why not just try to ping the server you're accessing, if it succeeds, go ahead using the try/error/end method mentioned above. then if the OTHER machine is down, or your net(work) connection is broken/slow/cut off from that server, it wont go nuts.
__________________
PowerMac G5 Dual 2.0Ghz | 1Gb | 250Gb | Bluetooth | NVidia GeForce 6800 Ultra DDL 256Mb | 20" Cinema Display | MX1000 Wireless Laser Mouse | OS X 10.3.9

PowerMac G4 400Mhz | 832Mb | 40Gb + 120Gb | OS X Server 10.3.8 - Web Dev, Proxy, Mail, NAT, Firewall, Backup

Netgear Gigabit Switch | Sony Ericsson P910i Smartphone | iPod Colour 60Gb
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 04:54 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.