By Google Translate:
Greetings Community,
I raise my problem:
In a normal and current EXE, I want to execute an external code that I create and execute from a button, it is an accounting business rule, in short, let's say the code is this:
Rule.txt
Public oForm
oForm = CreateObject ("Accounting.Format")
oForm.Show (1)
************************************************** ****************************************
From my button I set it in a variable memo and execute it like this:
* I already have the external code located in rule.txt and I execute it like this:
The error I get is "Failed to create an instance of the class. Can not find C: \ systempath \ vcx \ accounting.vcx"
I have read that to use the libraries of another EXE should be included as:
The problem is that the code located in Regla.txt does not belong to an EXE but I run it inside the EXE itself.
The library is already declared in the main exe so I do not know what else it can be. If for example I take the code of Regla.txt and execute it inside the click of the button then it marks perfectly but the idea is to have the dynamic code since each client has different needs.
Thank you...!
Greetings Community,
I raise my problem:
In a normal and current EXE, I want to execute an external code that I create and execute from a button, it is an accounting business rule, in short, let's say the code is this:
Rule.txt
Public oForm
oForm = CreateObject ("Accounting.Format")
oForm.Show (1)
************************************************** ****************************************
From my button I set it in a variable memo and execute it like this:
Code:
Local lnHandle, lcScript As Memo
lnHandle = FOPEN ("c: \ Rule.txt")
IF lnHandle> 0
DO WHILE! FEOF (lnHandle)
IF EMPTY (lcScript)
lcScript = FGETS (lnHandle)
ELSE && EMPTY (lcScript)
lcScript = lcScript + CHR (13) + FGETS (lnHandle)
ENDIF && EMPTY (lcScript)
ENDDO
ELSE && lnHandle> 0
ENDIF && lnHandle> 0
FCLOSE (lnHandle)
* I already have the external code located in rule.txt and I execute it like this:
Code:
IF! EMPTY (lcScript)
= EXECSCRIPT (lcScript)
ELSE &&! EMPTY (lcScript)
ENDIF &&! EMPTY (lcScript)
The error I get is "Failed to create an instance of the class. Can not find C: \ systempath \ vcx \ accounting.vcx"
I have read that to use the libraries of another EXE should be included as:
Code:
SET CLASSLIB miClass IN miExe.exe ADDITIVE ALIAS miAlias
The problem is that the code located in Regla.txt does not belong to an EXE but I run it inside the EXE itself.
The library is already declared in the main exe so I do not know what else it can be. If for example I take the code of Regla.txt and execute it inside the click of the button then it marks perfectly but the idea is to have the dynamic code since each client has different needs.
Thank you...!