12-12-2011 04:12 AM - edited 03-14-2019 09:01 AM
Hi,
it's possible launch an external executable (Es. .\smsclient.exe "3201234567" "SMSClient.exe Tested on %date% at %time%") from script .aef (not from CAD)?
12-12-2011 12:23 PM
What version of UCCX is this for?
If it's for UCCX 8x, then the answer is "no". Unless you intend to run that command remotely on another machine. In that case you just need one of several methods available to you, for sending "commands" to third party servers. E.g., A web page that runs a local script.
If it's for UCCX 7x or lower, and you have Enhanced or Premium licensing, then the answer is "maybe". I do not have a 7x system to try this on, but here is a working example of running a command line in Java: http://www.linglom.com/2007/06/06/how-to-run-command-line-or-execute-external-application-from-java/
If you do in fact have UCCX 7x or lower, please do try this out and let us know how you fair. Good luck.
12-16-2011 12:07 AM
Hi Anthony,
i have developed a Java class how you said me. I receive the sms, if run application from Eclipse. But if I invoke this class from script .aef not operate. For an simply example i have also created an Notepad example but not open pop up with notepad but also in this case if I run application from Eclipse all correctly function.
Above there is my script and java source for Notepad example.
Have you any suggestion?
***************************************SCRIPT testNOTEPAD.AEF********************************
Start
Do
{
testpackage.Notepad AA = new testpackage.Notepad();
}
End
In console i read this output:
Begin Debugging C:\UCCX_Script_Esempi\TestNotepad.aef...
when i stop debug:
Done Debugging C:\UCCX_Script_Esempi\TestNotepad.aef.
but Nptepad.exe not running
********************************************************************************************************
*******************************************JAVA SOURCE ********************************************
package testpackage;
import java.io.*;
public class Notepad {
public static void Main(String args[]) {
try {
Runtime rt = Runtime.getRuntime();
Process pr = rt.exec("notepad.exe");
BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream()));
String line=null;
while((line=input.readLine()) != null) {
System.out.println(line);
}
int exitVal = pr.waitFor();
System.out.println("Exited with error code "+exitVal);
} catch(Exception e) {
System.out.println(e.toString());
e.printStackTrace();
}
}
}
12-16-2011 12:13 AM
Hi Anthony,
i have developed a Java class how you said me. I receive the sms, if run application from Eclipse. But if I invoke this class from script .aef not operate. For an simply example i have also created an Notepad example but not open pop up with notepad but also in this case if I run application from Eclipse all correctly function.
In attach there is my script and java source for Notepad example.
Have you any suggestion?
Regards,
giovanna
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide