|
Hi, i didn’t found how to rename the device in c, but it’s easy in python, so i tried
mApp.ExecuteScript("myscript.py nameAsArg");
but it look that ExecuteScript() do not accept arguments…
So i decide to build the .py :
FILE * fichier=fopen("myscript.py","w");
fprintf(fichier, "from pyfbsdk import *\n\n");
fprintf(fichier, "i=0\nwhile 1:\n\ttry :\n\t\tdevName = FBSystem().Devices[i].Name\n");
fprintf(fichier, "\t\tif devName == \"Gudd\":\n\t\t\tFBSystem().Devices[i].Name = \"");
fprintf(fichier, FBString(GetDevName()));
fprintf(fichier, "\"\n\t\t\tbreak\n");
fprintf(fichier, "\texcept:\n\t\tbreak");
fclose(fichier);
mApp.ExecuteScript("myscript.py");
That is perfectly working, for the rename, but when mobu is refreshing (modifie parametter, new scenne, ...), the ram is growing until it crash.
Moreover, i can’t load a scenne where the name was changed.
Any comments, ideas, or everything will be very helpfull for me to understand this ....
Thanks
3o3i
|