IP Phone

From Medien Wiki
Revision as of 13:21, 13 May 2011 by Max (talk | contribs)

Dieses script in ~/Library/Address Book plugins/ legen:

using terms from application "Address Book"
	on action property
		return "phone"
	end action property
	
	on action title for p with e
		return "mit IP Phone wählen"
	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 thePhoneNumber to "0" & (value of e as string)

		
		
		
		tell application "Safari"
			activate
			open location "https://telefon.uni-weimar.de/webdialer/Webdialer"
			delay 1
			tell application "Safari"
				do JavaScript "document.forms['loginForm'].elements['destination'].value ='" & thePhoneNumber & "'" in document 1
				-- do JavaScript "document.forms['loginForm'].elements['dial'].click()" in document 1
			end tell
		end tell
		return true
	end perform action
end using terms from