Skip to content

Instantly share code, notes, and snippets.

@mineiro
Created May 7, 2013 18:15
Show Gist options
  • Select an option

  • Save mineiro/5534831 to your computer and use it in GitHub Desktop.

Select an option

Save mineiro/5534831 to your computer and use it in GitHub Desktop.

Revisions

  1. José Netto created this gist May 7, 2013.
    17 changes: 17 additions & 0 deletions Import Skype Contacts.scpt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    set AppleScript's text item delimiters to {", "}

    set contactsFile to choose file of type {"public.text"} with prompt "Choose a file:" default location (path to desktop folder) without invisibles

    set contactsList to read contactsFile

    set delimitedContactsList to every text item of contactsList

    repeat with contactItem in delimitedContactsList

    tell application "Skype"

    send command "SET USER " & contactItem & " BUDDYSTATUS 2 Hi, please consider accepting this request as I'm changing my Skype username to this new one." script name "Import Skype Contacts"

    end tell

    end repeat
    25 changes: 25 additions & 0 deletions Readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    # Import Skype Contacts

    ## Overview

    **Import Skype Contacts.scpt** let's you import a list of Skype contacts from a text file.

    ### Exporting

    To export your Skype Contacts to a text file, just select, click and drag them.

    ### Importing

    To import the contacts list from the text file to Skype, download the **Import Skype Contacts.scpt** script, open it with **AppleScript Editor** and click **Run**.

    ### Customize

    You can customize the message that is sent to your contacts requesting the authorization.

    To do this, just change the "Hi, please..." text inside the **send** command:

    send command "SET USER " & contactItem & " BUDDYSTATUS 2 Hi, please consider accepting this request as I'm changing my Skype username to this new one." script name "Import Skype Contacts"

    ### More?

    Check Apple's [AppleScript Language Guide](https://developer.apple.com/library/mac/#documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html).