Hi all!
After several test, we found out example code only works in SC and WC if server and client are the same machine (launched from Developer)... Because executeProgram function works in client when launched from SC, but it's executed in server when launched from WC.
Due to this, we are using this code to calling:
- Code: Select all
function core_Skype_call(phoneNumber)
{
var vString = 'callto:'
// If parameter is null, opens Skype
if (phoneNumber)
vString = vString + phoneNumber;
if (application.getApplicationType() == APPLICATION_TYPES.WEB_CLIENT)
{
application.showURL(vString,'_self')
}
else
{
core_openFile(vString)
}
}
and this to chat:
- Code: Select all
function core_Skype_chat(contactName)
{
var vString = 'skype:'
// If parameter is null, opens Skype
if (contactName)
vString = vString + contactName + '?chat'
if (application.getApplicationType() == APPLICATION_TYPES.WEB_CLIENT)
{
application.showURL(vString,'_self')
}
else
{
core_openFile(vString)
}
}
And the core_openFile:
- Code: Select all
//windows
if(utils.stringMiddle(application.getOSName(),1,7) == "Windows")
{
application.executeProgramInBackground('rundll32', 'url.dll,FileProtocolHandler', vFullFileName)
}
//FreeBSD or Linux
else if(utils.stringMiddle(application.getOSName(),1,7) == "FreeBSD"||utils.stringMiddle(application.getOSName(),1,5) == "Linux")
{
application.executeProgramInBackground('gnome-open', vFullFileName)
}
//Mac OSX
else if(application.getOSName().match("Mac"))
{
application.executeProgramInBackground('open', vFullFileName)
}
Well, in Windows, it's working right in all scenarios (SC, WC in a production server)... But in Linux it's not working...
Somebody could help us with this? Some tip about this??
Thanks in advance!