PDA

View Full Version : skype shell script to application


prramesh
05-21-2010, 09:17 AM
The following shell script works very well to make a call with Skype

osascript -l AppleScript -e "tell application \"Skype\" to get URL \"callto://+49176xxxx\""

I want to use this script as an application and place it in Dock.

I made skype.sh file with the above script and I did chmod of this file (chmod +x skype.sh in terminal)

In script editor I wrote the following
do shell script "skype.sh"

and it works when I run the script in script editor. I saved it as an application, but it's not working anymore.

Some one please help me how to make an application out of this and place it in Dock.

SirDice
05-21-2010, 09:26 AM
Why don't you just create an AppleScript? There's no need to start a shell to start an applescript.

prramesh
05-21-2010, 09:31 AM
sorry I don't know "how to write AppleScript". I hope any of you guys can assist me.

SirDice
05-21-2010, 09:46 AM
This bit is the applescript bit:

tell application "Skype" to get URL "callto://+49176xxxx"


http://homepage.mac.com/swain/Macinchem/Applescript/AppScript_tut/AppScrip_tut_1/appscript_tut_1.htm

What you're currently doing is load a shell to execute a shell script, the shell script loads osascript which in turn loads and executes the applescript. It's like going to the moon via mars.

tw
05-21-2010, 10:22 AM
what you do is to open the Script Editor (/Applications/Utilities/AppleScript Editor.app/ in 10.6, or /Applications/AppleScript/Script Editor.app/ in 10.5), copy the line SirDice gave above into the script window, and save it, making sure to set the format to "Application". that will produce a clickable application that you can run from the dock (or anywhere).

also, it's not a good idea to post phone numbers like this on line. I'll ask the mods to xxx it out.

prramesh
05-21-2010, 10:30 AM
thanks a lot and it works great