Jump to content

Contact Phone #'s to DeskConnect


Recommended Posts

I have DeskConnect setup on my Macbook and love using it with Cobook to look up contacts, find their phone number, and select "Dial with DeskConnect".  DeskConnect is registered as a service to do dialing, just like Skype.

 

Is there any way to get similar behavior with Alfred on contacts?  Alfred is faster at looking people up, I just can't get it to Dial via DeskConnect.

Link to comment

I have DeskConnect setup on my Macbook and love using it with Cobook to look up contacts, find their phone number, and select "Dial with DeskConnect".  DeskConnect is registered as a service to do dialing, just like Skype.

 

Is there any way to get similar behavior with Alfred on contacts?  Alfred is faster at looking people up, I just can't get it to Dial via DeskConnect.

 

How do you tell it to dial with DeskConnect? Some form of API? URI Scheme? If you could share a few more details with me, I'd be happy to help you work this out.

Link to comment

How do you tell it to dial with DeskConnect? Some form of API? URI Scheme? If you could share a few more details with me, I'd be happy to help you work this out.

I have to admit I don't know.. It's registered as a Service in my Service Preferences window (Call with DeskConnect), but I don't know how to get any details.

 

Running it from the commandline "/Applications/DeskConnect.app/Contents/MacOS/DeskConnect <phone number>" just launches the app.. No info with a --help.  Using "deskconnect://" isn't recognized.  They have a bookmarklet that I use on my iPhone that references https://api.deskconnect.com/bookmarklet.js with some special API keys for authentication.  After urldecoding it, it looks like this:

(function(){
	var h=document.getElementsByTagName("head")[0];
	var s=document.createElement("script");
	s.src="https://api.deskconnect.com/bookmarklet.js";
	s.onload=function(){
		push("hidden", "hidden", "hidden");
	};
	h.appendChild(s);
})()

(redacted the API keys).

 

The app is free on the App Store if you want to try it out.. 

Link to comment

Hey guys,

 

Developer of DeskConnect here! DeskConnect supports both AppleScript and URL schemes. It's pretty simple to start a call with AppleScript:

tell application "DeskConnect" to call "1-800-MY-APPLE"

You can also send files and URLs this way!

tell application "DeskConnect" to send URL "http://apple.com" to (the device named "Ari's iPhone")

DeskConnect registers the tel: scheme, so you can open a url like tel://1800MYAPPLE on your Mac to initiate the call on your iPhone.

 

Note that it is possible that another app on your system might have already registered tel:, so the next release of DeskConnect adds a "deskconnect-tel" scheme (i.e. deskconnect-tel://1800MYAPPLE) to make sure that the DeskConnect app is the one handling the call. The updated DeskConnect app, version 1.1, should be available on the App Store this week!

 

Can't wait to hear what you come up with, I'm a big fan of Alfred. Hoping to get some time soon to work on more cool ways to integrate DeskConnect into other apps. Nice reverse engineering of our bookmarklet system ;)

Edited by AriX
Link to comment

Hey guys,

 

Developer of DeskConnect here! DeskConnect supports both AppleScript and URL schemes. It's pretty simple to start a call with AppleScript:

tell application "DeskConnect" to call "1-800-MY-APPLE"

You can also send files and URLs this way!

tell application "DeskConnect" to send URL "http://apple.com" to (the device named "Ari's iPhone")

DeskConnect registers the tel: scheme, so you can open a url like tel://1800MYAPPLE on your Mac to initiate the call on your iPhone.

 

Note that it is possible that another app on your system might have already registered tel:, so the next release of DeskConnect adds a "deskconnect-tel" scheme (i.e. deskconnect-tel://1800MYAPPLE) to make sure that the DeskConnect app is the one handling the call. The updated DeskConnect app, version 1.1, should be available on the App Store this week!

 

Can't wait to hear what you come up with, I'm a big fan of Alfred. Hoping to get some time soon to work on more cool ways to integrate DeskConnect into other apps. Nice reverse engineering of our bookmarklet system ;)

 

Awesome AriX, thanks for the info!

 

Well, Yeraze, thanks to AriX, this should be extremely easy :)

 

Try this.

 

Import it, then go to Preferences->Features->Contacts. Click the + in the bottom right, set the Contact Field to "Phone" then for action, select "Call via DeskConnect". Enjoy. 

Link to comment

Awesome!  That's _exactly_ what I was looking for! :)

 

thanks AriX for stopping by!  Is that documented anywhere (the applescript support?).  I can see some awesome ways to use that elsewhere.

 

Sure! I'm glad I happened to see your post. At some point I will write up proper documentation, but DeskConnect's AppleScript support is, as any other app, documented through its scripting dictionary.

 

To see the DeskConnect scripting dictionary, open the AppleScript Editor and choose File -> Open Dictionary. Find DeskConnect in the list of applications and open its dictionary to see the supported commands. Feel free to let me know if you have any questions or suggestions, or if you just want to show off what you come up with! (Also note that DeskConnect has Automator support, which could be helpful for some simpler tasks.)

Edited by AriX
Link to comment
  • 5 months later...
Hi AriX !

Running the following with an input from a File Action results in this: http://piteo.us/1kWqwTs (the result is set to true but I get the shown popup)

 

on alfred_script(q)

  tell application "DeskConnect" to set result to (send temporary file q to all devices)

if result is "false" then

return "Failed to send."

else

return "Sent!"

end if

end alfred_script

 

same issue for just "send file q..."

 

On my phone, it shows the items in the list but after about 10 minutes of the "Waiting..." indicator it gives me a UIAlertView of "The file was not properly uploaded"

 

What I have so far: http://piteo.us/1kWrter

Link to comment

Hi AriX !

Hey! Sorry for my slow response.

Running the following with an input from a File Action results in this: http://piteo.us/1kWqwTs (the result is set to true but I get the shown popup)

Want to try posting that screenshot again? I'm not sure you showed what you meant to.

 

on alfred_script(q)

  tell application "DeskConnect" to set result to (send temporary file q to all devices)

if result is "false" then

return "Failed to send."

else

return "Sent!"

end if

end alfred_script

same issue for just "send file q..."
You definitely don't want to use "send temporary file" for this purpose. Send temporary file deletes your file after it's been sent.

 

On my phone, it shows the items in the list but after about 10 minutes of the "Waiting..." indicator it gives me a UIAlertView of "The file was not properly uploaded"

 

What I have so far: http://piteo.us/1kWrter

Very strange. Are you able to send the file in question through DeskConnect manually, by dragging it to the DeskConnect icon? Or does it fail there too? Edited by AriX
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...