Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

This should send a message to your (iPhone) telephone number. Please note that you can't send an iMessage to yourself. Sending it to an alias may work. Other similar (Apple)scripts are available here: How to send an imessage text with applescript, only in provided service?How to send an imessage text with applescript, only in provided service?

This should send a message to your (iPhone) telephone number. Please note that you can't send an iMessage to yourself. Sending it to an alias may work. Other similar (Apple)scripts are available here: How to send an imessage text with applescript, only in provided service?

This should send a message to your (iPhone) telephone number. Please note that you can't send an iMessage to yourself. Sending it to an alias may work. Other similar (Apple)scripts are available here: How to send an imessage text with applescript, only in provided service?

Bounty Ended with 100 reputation awarded by iolsmit
added 1471 characters in body
Source Link
klanomath
  • 67k
  • 10
  • 135
  • 204

To send a message after a triggering event do the following - change <user_name> to your OS X short username and <telephone_number> to an appropriate telephone number below:

  • Create a dir and change to it:

      mkdir ~/.soundmeter
      cd ~/.soundmeter
    
  • Create an AppleScript:

      nano sendMessage.applescript
    

with the content:

    on run {targetBuddyPhone, targetMessage}
        tell application "Messages"
            set targetService to 1st service whose service type = iMessage
            set targetBuddy to buddy targetBuddyPhone of targetService
            send targetMessage to targetBuddy
        end tell
    end run
  • Create a shell script:

      nano sendMessage.sh
    

with the content:

    #!/bin/bash

    osascript /Users/<user_name>/.soundmeter/sendMessage.applescript <telephone_number> "Another Arabica bean died"

and change the permissions:

    chmod 755 sendMessage.sh
  • Now start soundmeter with a command like this:

      soundmeter -t +38 -a exec -e /Users/<user_name>/.soundmeter/sendMessage.sh
    

This should send a message to your (iPhone) telephone number. Please note that you can't send an iMessage to yourself. Sending it to an alias may work. Other similar (Apple)scripts are available here: How to send an imessage text with applescript, only in provided service?


To send a message after a triggering event do the following - change <user_name> to your OS X short username and <telephone_number> to an appropriate telephone number below:

  • Create a dir and change to it:

      mkdir ~/.soundmeter
      cd ~/.soundmeter
    
  • Create an AppleScript:

      nano sendMessage.applescript
    

with the content:

    on run {targetBuddyPhone, targetMessage}
        tell application "Messages"
            set targetService to 1st service whose service type = iMessage
            set targetBuddy to buddy targetBuddyPhone of targetService
            send targetMessage to targetBuddy
        end tell
    end run
  • Create a shell script:

      nano sendMessage.sh
    

with the content:

    #!/bin/bash

    osascript /Users/<user_name>/.soundmeter/sendMessage.applescript <telephone_number> "Another Arabica bean died"

and change the permissions:

    chmod 755 sendMessage.sh
  • Now start soundmeter with a command like this:

      soundmeter -t +38 -a exec -e /Users/<user_name>/.soundmeter/sendMessage.sh
    

This should send a message to your (iPhone) telephone number. Please note that you can't send an iMessage to yourself. Sending it to an alias may work. Other similar (Apple)scripts are available here: How to send an imessage text with applescript, only in provided service?

added 58 characters in body
Source Link
klanomath
  • 67k
  • 10
  • 135
  • 204

Simply running soundmeter will output an RMS valueRMS value. After defining a threshold you can trigger a shell script action (which may itself trigger an AppleScript script) with the -e switch.

Simply running soundmeter will output an RMS value. After defining a threshold you can trigger a shell script action (which may itself trigger an AppleScript script) with the -e switch.

Simply running soundmeter will output an RMS value. After defining a threshold you can trigger a shell script action (which may itself trigger an AppleScript script) with the -e switch.

added 224 characters in body
Source Link
klanomath
  • 67k
  • 10
  • 135
  • 204
Loading
added 891 characters in body
Source Link
klanomath
  • 67k
  • 10
  • 135
  • 204
Loading
Source Link
klanomath
  • 67k
  • 10
  • 135
  • 204
Loading