Applescript and iChat

Discussion in 'Mac Programming' started by Rooster29, Feb 26, 2010.

  1. Rooster29 macrumors newbie

    Joined:
    Feb 26, 2010
    #1
    I am trying to get the following script to work so that messages are accepted and brought to the front only if the service type is Jabber, but I am not having any luck getting the IF statement to work. Any ideas?

    Thanks

    Code:
    using terms from application "iChat"
    	tell application "iChat"
    		if service = Jabber then
    			beeb
    		else
    			return
    		end if
    	end tell
    	on received text invitation theText from theBuddy for theChat
    		accept theChat
    		activate
    	end received text invitation
    	
    	on message received theMessage from theBuddy for theChat
    		activate
    	end message received
    end using terms from
     
  2. chown33 macrumors 604

    Joined:
    Aug 9, 2009
  3. Rooster29 thread starter macrumors newbie

    Joined:
    Feb 26, 2010
    #3
    no error message

    I am not getting an error message but the IF statement seems to have no affect at all. The rest of the script runs if the Instant Message is from AIM Bonjour or Jabber.
     

Share This Page