haonm
Newbie

Offline
Beiträge: 1
|
 |
« am: 21.09.2008, 00:52:54 » |
|
Hi everyone, I have to program some script for my game bot application and I need to call some procedure inside the Class and exe process by Name at run time. Now, I have to translate manually received string from script line and call the appropriate procedure, or I do specify some exportables of Procedure and Values to access from outside.
Example: txSendMoveTo: Procedure (x,y:single);
EXPORT txSendMoveTo name 'SendMoveTo'; END;
And when I wanna call it in my application, I have to do MyAddress := GetProcAddress(Self.Handle,'SendMoveTo'); <--- this string I can take it from the script file
I have to do like that to call a procedure if there's a matched string with the procedure name.
Is there anyway to do that easier? Because I have to define every procedure and variables to be export.
PS: There're many components for us to do with scripting in Delphi, but it only supports another languages: Perl, VBScript ... but I need Delphi Script for my application.
|