Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

An improved Skype - Address Book script Apps
I have started to use Skype, but found the plug-in that it installs for the Address Book application was not so good. For instance, it did not fix numbers that start with 0, which Skype did not like, as well as numbers that started with a leading number like 1 or 2.

I found this thread on the forus, which helped, but realised it needed to be updated for use in the UK -- most numbers are more than 10 digits, including the leading 0. 99% of my land-line numbers in Address Book start with a leading 0, and the rest with a plus sign; 25% of my mobile numbers start with a leading 0, and the rest with a plus sign.

So I fixed the script (view new script) to deal with all of these. If any number has a leading 0, then it will be dialled with a +44. If it has the +44, then it will be dialled with a +44. To get the script running, follow the instructions in the thread. Also, you can change the 44 to your own code.

So now the extra bit. I wanted to be able to also call the contact's computer using their Skype name (ie, Petersmac). The script now takes care of that. To get this function to work, here's what you need to do.

Go to Address Book and edit a card or template. Add a new phone number, but instead of calling it work or home, go down the list to custom. Now enter as a new label, the case sensitive name Skype. Enter the contact's Skype name where the number would normally go, and save. The next time you need to add a Skype name, the label should be there.

Now all you have to do is click the contact number/Skype name label, and go to the Skype dialler.

[robg adds: I haven't tested this one...]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[15,607 views]  

An improved Skype - Address Book script | 6 comments | Create New Account
Click here to return to the 'An improved Skype - Address Book script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An improved Skype - Address Book script
Authored by: jonn8n on Dec 27, '05 06:52:05AM
For a much more robust solution (albeit a paid one, though there is a free two-week evaluation period), check out Jon's Phone Tool. It also allows you to re-format a number in Address Book and dial through Skype but can do so much more.

You can select a number on a webpage and, using the included contextual menu, dial it not only through Skype, but through your Bluetooth mobile, your landline, Vonage, CallVantage, or any of several supported Dial Methods. It can be integrated with DayLite, Entourage, Now Contact, Palm Desktop, FileMaker Pro, and others.

In the latest release, it can even determine the call type (local, domestic long distance, international long distance, etc.) and then send the call to Dial Method you specify for that call type. So, for instance, local calls could go to your landline, domestic long distance could go to your Bluetooth mobile, and international long distance could go to Skype.

Jon

[ Reply to This | # ]
An improved Skype - Address Book script
Authored by: mark hunte on Dec 30, '05 04:24:58AM
Nice plug for your app. I'm sure it great. But this hint is for Dialling when in address book. The point of using it in AB is you can see all the details of that person. read through your notes, see who their spouse is, what the kids name is , their job info. and the call from AB without bringing up the dialling program first and doing the search again. With AB you can dial from BT, and Skype. Im sure landline is not that hard to set-up as a plugin also.

---
mh

[ Reply to This | # ]

An improved Skype - Address Book script
Authored by: jonn8n on Dec 30, '05 08:28:41AM

Yes, I understand, and JPT offers an Address Book Plug-In so you can be in AB, see all of your contacts, and click on the number to dial.

The benefit is that using my plug-in, if you click on a Skype URI, it is automatically sent to Skype, if it is a PSTN number, then JPT will evaluate it using its robust Dialing Rules and route it to the Dial Method you have configured for the type of call it is (i.e., local could go to landline, domestic long distance could go to your mobile, and international could go to Skype, etc.).

While JPT has great Skype support, it also supports dialing with Bluetooth mobiles, modems, Vonage, CallVantage, IP phones from Cisco, Snom, & others, Phlink, PhoneValet, Asterisk, and softphones from Xten, the Gizmo Project, ohphoneX, and more. It also supports many other contact managers beyond AB, all from within the application itself.

As to your remark that landlines wouldn't be hard to do, there are three ways to do it: use the speakers with DTMF tones you generate on the fly (not trivial), use the speakers with pre-recorded tones (easier, but not exactly easy), or write a serial port interface to dial a modem (not trivial). There are plug-ins out there (some are free) to do this but none offer the flexibility that JPT does.



[ Reply to This | # ]
An improved Skype - Address Book script
Authored by: tj2001 on Jul 20, '06 12:26:22PM

Now I'm not a super Apple Scriptor though I do like some of the new actions you implemented. My only query is that what if you live in the US and need the +1 instead of the +44?

---
www.macdynamix.com ---
:: Super Me I Am ::



[ Reply to This | # ]
An improved Skype - Address Book script
Authored by: mark hunte on Jul 20, '06 03:21:21PM
By: tj2001 on Thu, Jul 20 '06 at 12:26PM PDT Now I'm not a super Apple Scriptor though I do like some of the new actions you implemented. My only query is that what if you live in the US and need the +1 instead of the +44?
Simple. Here is the New Script.

Change your code in this part of the script property your_code : "+44" --set to you own country code.


property your_code : "+44" --set to you own country code.
using terms from application "Address Book"
	on action property
		return "phone"
	end action property
	
	on action title for p with e
		
		if label of e is equal to "Skype" then
			return "Call Skype Name"
		else
			return "Dial using Skype"
		end if
	end action title
	
	on should enable action for p with e
		return true
	end should enable action
	
	on perform action for p with e
		set _alphabet to {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "Â
		q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "Â
		K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "+"}
		set phone_num to the value of e
		
		set phoneC to character 1 of phone_num as string
		
		if phoneC is not in _alphabet then
			
			set phone_num to your_code & characters 2 thru -1 of phone_num --addplus(phone_num, _alphabet)
			
		else
			
		end if
		
		
		-- Clean up the number from any extraneous characters
		-- like blanks, '(', ')', '-' .
		set phone_num to replace_chars(phone_num, "-", "")
		set phone_num to replace_chars(phone_num, "(", "")
		set phone_num to replace_chars(phone_num, ")", "")
		set phone_num to replace_chars(phone_num, " ", "")
		skype_out(phone_num)
		
	end perform action
	
	on addplus(phone_num, _alphabet)
		--if phone_num does not start with "+" then
		set phone_num to "+44" & characters 2 thru -1 of phone_num
		
		--end if
	end addplus
	
end using terms from

on skype_out(phone_num)
	tell application "Skype"
		activate
		set call_string to "callto:" & phone_num
		get URL call_string
	end tell
end skype_out

-- Text replace function
on replace_chars(this_text, search_string, replacement_string)
	set AppleScript's text item delimiters to the search_string
	set the item_list to every text item of this_text
	set AppleScript's text item delimiters to the replacement_string
	set this_text to the item_list as string
	set AppleScript's text item delimiters to ""
	return this_text
end replace_chars

---
mh

[ Reply to This | # ]

An improved Skype - Address Book script
Authored by: skz on Jul 07, '10 11:36:26AM

great tip! but, I live between Uk and Italy.. so I'd like to use +39 and +44... any idea how to modify the script?

cheers



[ Reply to This | # ]