This ver is a replacement for the Prev ver U/L earlier today. The prev U/L contained a Glitch, which failed to Omit the 0 Prefix from Local Nums when making Local Calls. Thereby causing Skype to Rtn an error, as you can’t insert a Country’s Dialing Code preceding the Tel Num’s 0 Prefix. However, this has now been fixed: -
–Open this script in a new Script Editor window.
(* -------->Skype Plugin Defined:<--------
This script was Originally written by: “bertlmike” from: “forum.skype.com”. However, the Original HTML Link has
since been severed. However this ver incorporates a few changes in the: “skype_out” Handler: -
i. On first run the Display Dialog Cmnd uses the Free Prop Var to allow the user to Enter & Retain its Country’s Dialing Code.
ii. It is my contention that most users in the UK & US do not prefix their Contact Nums with their Country’s Dialing Code. To -
this end, an “if” Statement is used to establish whether the Contact’s Num in: “Address Book” is 10 or more Digits Long & -
does not Comprise the “+” Symbol. If true, signifies that the Num being dialled is Local. Thus, Some users may have -
included Spaces. I haven’t bothered to strip these, as “Skype” is impartial to White Space.
iii. Lastly; Notes have been appended to aid further development
-------->Installation Instructions: - Note: “~/” = Home Dir & “/” = Startup Disk:<--------
i. Place a copy of this file in either the /Library/Address Book Plug-Ins, in order that this Plugin can be accessed by all Accounts on
the Sys or the ~/Library/Address Book Plug-Ins folder, if this Plugin is just to be used by your Account.
ii. If “Address Book” is Open Quit & Reopen.
iii. Right Click on a Contact’s phone or mobile Num & from the Roll Over menu select: “Call with SkypeOut”.
iv. Done. *)
usingtermsfromapplication "Address Book"
(* Selects the field from which Prop info should be Rtned -
Result Returned: Vcard id & Tel Num. Thus, Rtned data
is accessible by proceeding Handlers. *)
onaction property
return "phone"
endaction property
–> Selects Roll Over Option Name to be used
onaction title –for p with e → Note: “for” & “with” Params not Req’d
return "Call with SkypeOut"
endaction title
(* Allows Target Roll Over to become Active when set to true -
Otherwise if set to false - Roll Over Option is Greyed Out. *)
onshould enable action –for p with e → Note: “for” & “with” Params not Req’d
returntrue
endshould enable action
–>Exe “skype_out” Handler → Note: “for” & “with” Params Are Req’d
onperform actionforpwithe
skype_outcolor=violet[/color]
endperform action
endusingtermsfrom
–>Free Prop Var
propertypMyCountryCode : “”
onskype_outcolor=violet[/color]
(* Debug Code Block
try
display dialog phone_num as string
on error errMsg
display dialog errMsg
end try *)
–> Prompts user to enter its Country’s Code on First Run - Recompile to Reset
if (pMyCountryCode = “”) thensetpMyCountryCodetotext returnedof ¬
(display dialog "Enter Your Country’s Dialing Code:" default answer "+44")
tellapplication "Skype"
(* → London Nums in their Entirety Comprise 10 Digits
→ ii. Home County Nums in their Entirety Comprise 11 Digits & Only 7 Digits when making -
a Call to another Num within the same County.
iii. Mobile Nums in the UK Comprise: 11 Digits.
iv. Note: Some users may have formatted their contact Nums with Spaces - White Space has
not been stripped as “Skype” is not White Space sensitive. *)
–>If true - Signifies Num Dialed is local - Users don’t prefix Nums with their County’s Code.
if ((countphone_num) is greater than or equal to 7and (phone_numdoesnotcontain "+")) then
–> Appends County’s Code for Making Local Calls
get URL "callto:" & (pMyCountryCode & (restof (charactersofphone_num) asstring))
else
–> Long Dist Calls should already have Included the Code for the Country being dialled.
get URL "callto:" & phone_num
endif
endtell
endskype_out
shars
[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]