Page 1 of 1

Skype for Business snippet

Posted: 30 Oct 2017, 05:13
by sumon
Simple but incredibly useful snippet to ignore Skype for Business's clumsy interface when trying to contact someone. Select an email adress and hit #s - alternatively, hit #s and type in the name of the person you wanna contact. Note that you should customise this script to include your default organization name.

By the way, if you use Skype alot, you could add a "sip:youremail@yourorganisation.com" URL in your e-mail signature. Should work, and is quite cool.

Code: Select all

#s:: ; Open Skype for Business
If InStr(toOpen := GST(), "@")
	Run, sip:%toOpen%
else if InStr(toOpen := Clipboard, "@")
	Run, sip:%toOpen%
else
{
	InputBox, toOpen, Skype Me!, Name Surname,, 155, 125,,,,, % Clipboard
	If ErrorLevel
		return
	else
	{
		StringReplace, toOpen, toOpen, %A_Space%,., All ; Replaces spaces to create email adress
		StringReplace, toOpen, toOpen, å,a, All ; Some crude string replacement
		StringReplace, toOpen, toOpen, ö,o, All
		StringReplace, toOpen, toOpen, ä,a, All
		Run, sip:%toOpen%@yourorganisation.com ; Insert your organisation name here
	}
}
return
Requires GST() by Learning One

Code: Select all

gst() {   ; GetSelectedText or FilePath in Windows Explorer  by Learning one 

	IsClipEmpty := (Clipboard = "") ? 1 : 0
	if !IsClipEmpty {
		ClipboardBackup := ClipboardAll
		While !(Clipboard = "") {
			Clipboard =
			Sleep, 10
		}
	}
	Send, ^c
	ClipWait, 0.1
	ToReturn := Clipboard, Clipboard := ClipboardBackup
	if !IsClipEmpty
	ClipWait, 0.5, 1
	Return ToReturn
}

Re: Skype for Business snippet

Posted: 30 Oct 2017, 13:36
by BGM
Nice to see a script that helps out Skype for Business.
Maybe you could fix something else too? What I hate about Skype for Business is that whenever it starts up it takes over the callto: url protocol. I use callto links with my softphone, never with skype and whenever I reboot my computer I have to constantly reset my softphone to handle the callto links.

Re: Skype for Business snippet

Posted: 19 Dec 2017, 10:09
by sumon
Thanks! That sounds complicated, and like something Skype should have as a setting... sorry, cannot resolve :)