Skype: Automatically answer calls from certain contacts

Discussion in 'Mac Programming' started by badox, Aug 13, 2013.

  1. macrumors newbie

    Joined:
    Aug 13, 2013
    #1
    Hi there,

    I've been looking into getting a script to auto answer Skype calls from specific contacts. This is what I found online but it seems incomplete, could anyone help me with it? :(:confused:

    Code:
    set desired_callers to {"user1", "user2"}
    set autoVideo to true # enable video automatically
    set timespan to 10
     
    # starting skype if not running
    tell application "Skype" to activate
     
    repeat
    	tell application "Skype"
    		set calls to send command "SEARCH ACTIVECALLS" script name "AnsweringScript"
    		set callID to last word of calls
    		if callID is not "CALLS" then
    			set status to send command "GET CALL " & callID & " STATUS" script name "AnsweringScript"
    			set caller to send command "GET CALL " & callID & " PARTNER_HANDLE" script name "AnsweringScript"
    			if last word of status is "RINGING" and desired_callers contains last word of caller then
    				send command "ALTER CALL " & callID & " ANSWER" script name "AnsweringScript"
    			else if desired_callers contains last word of caller and autoVideo then
    				send command "ALTER CALL " & callID & " START_VIDEO_SEND" script name "AnsweringScript"
    			end if
    		end if
    	end tell
    	delay timespan
    end repeat
    Also tried following the last instruction

    "Just export this snippet from the AppleScript Editor as an application and set it as a hidden Login Item for the current user."

    but it's not working...:confused:
     
  2. macrumors member

    Joined:
    Aug 14, 2011
    #2
    IS this possibly a case of accented characters? i.e. ÿ é ń etc...? You might have to use escape characters for those.

    Furthermore, another issue I see often on Skype is that people regularly change their NAME not Skype ID.

    So rather looking at the last name, rather use the Skype ID.

    I see from the script you're calling to check:

    Code:
    if last word of status is "RINGING" and desired_callers contains last word of caller then
    It's probably looking at the Surname (or whatever their last word is in their name) rather than their ID.
     

Share This Page