applescript to send iChat

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

applescript to send iChat Fri Nov 09, 2012 4:36 am • by nitrokev
I have set up hazel on our server so that is it monitoring a network share, but the problem with this is notifying people when rules are matched. So I've set a rule to send a iChat to certain people ( I'd prefer it to send the message to the person who placed the file but I see no way to do that)

I'd like to improve this script so that it included part of the file path in the message, but not the whole path, just the 3 enclosing folders, not sure if that is possible?


Code: Select all
set peopleICareAbout to {"Rob Hardy", "Davey Podmore", "David Brudnell", "Amanda Marwood"}
tell application "Image Events"
   set the props_rec to the properties of theFile
   set fileName to the (name of props_rec)
   
end tell

tell application "Messages"
   repeat with myBuddy in buddies
      --get properties of myBuddy
      if full name of myBuddy is in peopleICareAbout then
         send fileName & " has been placed in RAW GRAPHICS" & return & "Check it is Vector and move to the correct graphics folder" to myBuddy
      end if
   end repeat
end tell
nitrokev
 
Posts: 3
Joined: Fri Nov 09, 2012 4:29 am

Re: applescript to send iChat Fri Nov 09, 2012 12:49 pm • by Mr_Noodle
Please do not post questions in the Tips forum (see sticky article at the top of that forum).

I suggest googling around for AppleScript tutorials on how to do this. Maybe someone else can chime in here but it's not a Hazel-specific issue.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support