| View previous topic :: View next topic |
| Author |
Message |
iNext Expert Cheater
Reputation: 0
Joined: 06 Aug 2007 Posts: 138
|
Posted: Sat Aug 09, 2008 11:50 am Post subject: [Q] [Delphi] Intergrate Scripts Into Delphi |
|
|
Hi everyone. Some of you may have seen me from while back. I used to be really into Gaia. I was going to make a bot for it using a scripting language (AC Tool, AutoIt, or Autohotkey) but I found out that it's a lot harder to do that on a scripting language rather than a programming language. So I picked up a Delphi guide or two and I am here to ask anyone who knows anything about Delphi just a couple of questions.
Right now I am working on a trainer with a build in bot (nothing too fancy, just getting the job done). I want to use a couple of scripts from AC Tool though and I don't know how to do it. I know that in AC Tool they have an "Include" command that lets you add the path of a script you want to run in another script. This just helps out with making the code look much cleaner. But is there any function or procedure in Delphi that would allow me to take an ".inc" script and add it to a Delphi program and assign a button to it (when the button is clicked the bot starts). I think I could maybe do something with a DLL and then assign the DLL to a button but every DLL creation guide/tutorial I find for Delphi doesn't help me in the way that I need it. Thank you in advance for reading this. And any help would be awesome.
|
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
|
| Back to top |
|
 |
iNext Expert Cheater
Reputation: 0
Joined: 06 Aug 2007 Posts: 138
|
Posted: Sat Aug 09, 2008 2:50 pm Post subject: |
|
|
| Huh... looks neat. I wonder if it can do all the things that AC Tool does though. Would I be able to use the AC Tool scripts and that pascal script in my Delphi application?
|
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Sat Aug 09, 2008 4:03 pm Post subject: |
|
|
| You could write those functions by your own, and people could write macros-scripts..and you can use those scripts in your program via Pascal Script engine.
|
|
| Back to top |
|
 |
DoomsDay Grandmaster Cheater
Reputation: 0
Joined: 06 Jan 2007 Posts: 768 Location: %HomePath%
|
Posted: Sat Aug 09, 2008 4:25 pm Post subject: |
|
|
AC-Tool is open source, and is in fact programmed with delphi.
http://www.actool.net/
|
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Sun Aug 10, 2008 4:33 am Post subject: |
|
|
| rEakW0n wrote: | | You could write those functions by your own, and people could write macros-scripts..and you can use those scripts in your program via Pascal Script engine. |
I'm interested in knowing this aswell.
Let's say I've made a built in command for a ShowMessage procedure, and they type this in a TEdit box:
| Code: | | MessageShow('Whatever here'); |
How would I make my project find out what command it is, and then show what the user has written.
|
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Sun Aug 10, 2008 8:02 am Post subject: |
|
|
| Moller wrote: | | rEakW0n wrote: | | You could write those functions by your own, and people could write macros-scripts..and you can use those scripts in your program via Pascal Script engine. |
I'm interested in knowing this aswell.
Let's say I've made a built in command for a ShowMessage procedure, and they type this in a TEdit box:
| Code: | | MessageShow('Whatever here'); |
How would I make my project find out what command it is, and then show what the user has written. |
I'm not sure how that Pascal Script works, I've never used it before.
But yea I think stuff like that should work.
I'm going to try this soon.
|
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Sun Aug 10, 2008 8:03 am Post subject: |
|
|
| rEakW0n wrote: | | Moller wrote: | | rEakW0n wrote: | | You could write those functions by your own, and people could write macros-scripts..and you can use those scripts in your program via Pascal Script engine. |
I'm interested in knowing this aswell.
Let's say I've made a built in command for a ShowMessage procedure, and they type this in a TEdit box:
| Code: | | MessageShow('Whatever here'); |
How would I make my project find out what command it is, and then show what the user has written. |
I'm not sure how that Pascal Script works, I've never used it before.
But yea I think stuff like that should work.
I'm going to try this soon. |
I wasn't talking about Pascal Script, but Delphi itself.
|
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Sun Aug 10, 2008 8:32 am Post subject: |
|
|
| Moller wrote: | | rEakW0n wrote: | | Moller wrote: | | rEakW0n wrote: | | You could write those functions by your own, and people could write macros-scripts..and you can use those scripts in your program via Pascal Script engine. |
I'm interested in knowing this aswell.
Let's say I've made a built in command for a ShowMessage procedure, and they type this in a TEdit box:
| Code: | | MessageShow('Whatever here'); |
How would I make my project find out what command it is, and then show what the user has written. |
I'm not sure how that Pascal Script works, I've never used it before.
But yea I think stuff like that should work.
I'm going to try this soon. |
I wasn't talking about Pascal Script, but Delphi itself. |
No then.
Unless you do a check like this:
| Code: | procedure TForm1.Button1Click(Sender: TObject);
var
i, pos1, pos2, pos3: integer;
messagestr: string;
begin
pos1 := AnsiPos('ShowMessage', Edit1.Text);
pos2 := AnsiPos('('+chr(39), Edit1.Text);
pos3 := AnsiPos(chr(39)+')', Edit1.Text);
if(pos1 > 0) then
begin
if(pos2 > pos1) then
begin
for i:=pos2+2 to pos3-1 do
messagestr := messagestr+edit1.text[i];
ShowMessage(messagestr);
end;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
ShowMessage(inttostr(ord(edit1.text[1])));
end; |
This will check if the command ShowMessage(); is found.
It's a bad check since it doesn't ignore spaces and other stuff, but an example.
|
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Sun Aug 10, 2008 8:47 am Post subject: |
|
|
| rEakW0n wrote: | This will check if the command ShowMessage(); is found.
It's a bad check since it doesn't ignore spaces and other stuff, but an example. |
Yeah, it works.
Wish there were a more simple way though.
|
|
| Back to top |
|
 |
iNext Expert Cheater
Reputation: 0
Joined: 06 Aug 2007 Posts: 138
|
Posted: Mon Aug 11, 2008 6:57 pm Post subject: |
|
|
There probably is. Just got to search a lot.
|
|
| Back to top |
|
 |
|