One Response

  1. Horst
    Horst January 9, 2011 at 3:30 pm | | Reply

    Hi,
    many thanks for your skript. I adapted it for suiting to fritz.mac suite. Now, it works like a charme.


    property countryPrefix : "+49"

    on formatNumber(theString)
    set theNumber to ""

    if theString starts with countryPrefix then
    set theString to text ((length of countryPrefix) + 1) thru -1 of theString
    set theNumber to "0"
    end if

    repeat with i from 1 to (length of theString)
    set c to character i of theString

    if c = "+" then
    set theNumber to theNumber & "00"
    else if "0123456789" contains c then
    set theNumber to theNumber & c
    end if
    end repeat
    return theNumber
    end formatNumber

    on handle_string(theNumber)
    set theNumber to formatNumber(theNumber)

    (*****************************************
    ***** this is the main call to fritz.mac Suite: *******
    *****************************************)
    tell application "fritz.mac Suite" to call to theNumber

    end handle_string

Leave a Reply