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

Dial phone numbers using Skype via Launchbar Apps
Launchbar has a feature that allows one to run a script when the result of a search is a phone number. I found the following script online, which allows you to dial the number in Skype.
property lb_prefix : "tel:"

on handle_string(s)
  --trim the LaunchBar prefix if it exists:  
  if s starts with lb_prefix then set s to 
    (text ((count lb_prefix) + 1) thru -1 of s)
  tell application "Skype"
    get URL "callto:+1" & s
  end tell
end handle_string
This works fine for US numbers. However, it doesn't seem to work with international numbers. For example, if the number starts with "+44" then the script will tell Skype to dial "+1+44." Does anybody know how to modify it?

[robg adds: In order to give credit where credit is due, I did a bit of web searching for the original posting of the above script. I believe I found it in this anonymous comment to an article called Mac Asterisk community, and dial Skype from your Address Book on the B.Mann Consulting web site. I don't have Skype installed, though, so I can't test this one...]
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[13,089 views]  

Dial phone numbers using Skype via Launchbar | 3 comments | Create New Account
Click here to return to the 'Dial phone numbers using Skype via Launchbar' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
International dialing
Authored by: oliverlangan on Aug 17, '05 03:57:55PM

The +1 is being added in the script, on the line:

    get URL "callto:+1" & s

One way to get correct international dialing would be to remove that +1; however that assumes that all the US numbers in your Address Book already have +1 prepended to them. A more useful solution would be to check the number string for the presence of '+' or '+1' or '1' or any other digit, and behave differently according to each case (do nothing in the first two cases, prepend '+' in the third case, and preped '+1' in the fourth case).

I will probably write this addition, but I can't check it out without skype (work doesn't let it through). Actually, I can: but I am busy. That is 'home' work.

Very useful hint, btw!

o



[ Reply to This | # ]
Try this
Authored by: sinjin on Aug 18, '05 01:02:32AM
property lb_prefix : "tel:"
on handle_string(the_number)
	--trim the LaunchBar prefix if it exists:  
	if the_number starts with lb_prefix then set the_number to 
		(text ((count lb_prefix) + 1) thru -1 of the_number)
	if first character of the_number is "+" then
		set country_code to ""
	else if first character of the_number is "1" then
		set country_code to "+"
	else
		set country_code to "+1"
	end if
	try
		tell application "Skype"
			get URL "callto:" & country_code & the_number
		end tell
	on error
		display dialog "Better check that number and try again!"
	end try
end handle_string
Perhaps you can help me, now! I can't figure out how to set up Launchbar to direct phone numbers to this script. I read the LB help and see how to pass input text to the script, but not the results of a phone number search.

[ Reply to This | # ]
Dial phone numbers using Skype via Launchbar
Authored by: jonn8n on Aug 19, '05 11:10:41PM
As the original hint states, this is adapted from scripts I include with Jon's Phone Tool which can dial Skype or any of several other Dial Methods (Vonage, CallVantage, land line, Bluetooth mobile, Asterisk, and more) and has many other valuable features.

Jon

[ Reply to This | # ]