Startseite ¦  was ist neu ¦  programmier tips ¦  indy artikel ¦  intraweb artikel ¦  informationen ¦  links ¦  interviews ¦  sonstiges
kylix ¦  tutorials ¦  online shop ¦  fotos ¦  Add&Win Gewinnspiel


Willkommen Gast. Bitte einloggen oder registrieren.
04.02.2012, 09:12:13
Übersicht Hilfe Suche Einloggen Registrieren

+  SwissDelphiCenter Forum
|-+  English Forums
| |-+  General Forum
| | |-+  Access Variable Name and Procedure Name in Real Time (Need suggestion)
« vorheriges nächstes »
Seiten: [1] Drucken
Autor Thema: Access Variable Name and Procedure Name in Real Time (Need suggestion)  (Gelesen 1552 mal)
haonm
Newbie
*
Offline Offline

Beiträge: 1


E-Mail
« 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.






Gespeichert
Seiten: [1] Drucken 
« vorheriges nächstes »
Gehe zu:  


Einloggen mit Benutzername, Passwort und Sitzungslänge

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006, Simple Machines LLC Prüfe XHTML 1.0 Prüfe CSS