sending notifications with iMessage via osascript
Posted: May 29th, 2012, 4:22 pm
I am trying to send imessage notifications from a Sab post-processing script. I've tried a few things so far:
This script works from the command line
then I changed it a little for Sab, but if "$3" ,the clean file name, has spaces in the name it only sent the 1st item. (I assumed that was because of the "item 1 of argv" in the applescript part)
so I tried taking out the "item 1 of argv" , but now I get this error in sab
This script works from the command line
Code: Select all
#!/bin/bash
#sends message via Messages to BUDDY
#[email protected]
osascript -e 'on run argv' -e 'tell application "iChat"' -e 'set theMessage to argv' -e 'send theMessage to buddy "[email protected]" of service 1' -e 'end tell' -e 'end run' "$*"
Code: Select all
#!/bin/bash
#sends message via Messages to BUDDY
#[email protected]
osascript -e 'on run argv' -e 'tell application "iChat"' -e 'set theMessage to item 1 of argv' -e 'send theMessage to buddy "[email protected]" of service 1' -e 'end tell' -e 'end run' "Your Show has finished downloading "$3""
any ideas? Thanks60:119: execution error: iChat got an error: Can’t make {"Your Show has finished downloading Too", "Big", "To", "Fail", "2011", "DVDRip", "XviD", "BeStDivX"} into type text, file, constant. (-1700)