• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Executing script by ip address
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Executing script by ip address


  • Subject: Re: Executing script by ip address
  • From: Steve Thompson <email@hidden>
  • Date: Tue, 31 Dec 2013 19:23:34 +0000

You can’t do this from AppleScript alone. What is your ultimate goal?

The way I achieve this (I detect if mobile phones are around to see who is at home) is a script called pinger.sh

count=$(ping -c 1 192.168.1.99 | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }’)
if [ $count -eq 1 ]; then
    # Do stuff here
fi

And then run it as a cron job every minute. If you want it to run an AppleScript, use osascript

Steve


On 31 Dec 2013, at 16:02, Porter Slice <email@hidden> wrote:

Hello, 

I would like to create a script that executes an Applescript when a specific static ip address is detected on the network. Is this possible, and how would I go about doing this. I apologize, but I am fairly new to Applescript. 

Thank you in advance for your help, 


Porter Slice 
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
  • Follow-Ups:
    • Re: Executing script by ip address
      • From: Stan Cleveland <email@hidden>
References: 
 >Executing script by ip address (From: Porter Slice <email@hidden>)

  • Prev by Date: Re: Executing script by ip address
  • Next by Date: Re: Executing script by ip address
  • Previous by thread: Re: Executing script by ip address
  • Next by thread: Re: Executing script by ip address
  • Index(es):
    • Date
    • Thread