Skype for Business snippet

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
sumon
Posts: 38
Joined: 01 Oct 2013, 14:05
Location: Stockholm, Sweden

Skype for Business snippet

30 Oct 2017, 05:13

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
}
User avatar
BGM
Posts: 507
Joined: 20 Nov 2013, 20:56
Contact:

Re: Skype for Business snippet

30 Oct 2017, 13:36

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.
User avatar
sumon
Posts: 38
Joined: 01 Oct 2013, 14:05
Location: Stockholm, Sweden

Re: Skype for Business snippet

19 Dec 2017, 10:09

Thanks! That sounds complicated, and like something Skype should have as a setting... sorry, cannot resolve :)

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 69 guests