please , is there an example script to use with the -exec switch ?
I would like to trigger different QCad scripts from an another application and the -exec switch could be an easy way to do it.
I don't have a lot of experience with Javascript so I'm encountering some problems writing a script for the -exec argument.
I read in the forum that the script must have :
- filename equal the class name
- beginEvent function
In example it's not clear to me when and where the object should be created.
Code: Select all
function TestClass () {
this.animal = "cat";
this.name = "toby";
}
TestClass.prototype.beginEvent = function() {
qDebug("TestClass beginEvent");
QMessageBox.information(null, "Animal", this.animal+" "+this.name);
}
sramp