| View previous topic :: View next topic |
| Author |
Message |
iRiot Master Cheater
Reputation: 0
Joined: 03 Jul 2007 Posts: 395 Location: Aka RIOT
|
Posted: Sat Dec 29, 2007 12:15 am Post subject: [Help] Calling a command by Edit1 (Delphi) |
|
|
is it possible to do so? like for example i have a button and edit1box..
For the button i want it to make it do the command that is in edit1.text
Edit1.text is ShowMessage('Test');
how would i make a button tell it to do the command thats in edit1.text
like example... do edit1.text
btw any1 know where to get the TClientSocket and TServerSocket cant find them on google...
_________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Dec 29, 2007 12:55 am Post subject: |
|
|
| Can't be done. How do you expect the code to be compiled?
|
|
| Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Sat Dec 29, 2007 5:27 am Post subject: |
|
|
Try this code, it work like macro: | Code: | if (pos('showmessage(''',edit2.Text)>0) and //Look for the [showmessage('] Command.
(pos(''');',edit2.Text)>pos('showmessage(''',edit2.Text))then //Look for the end of the command [');].
showmessage(
copy(edit2.Text,//Copy the text from [showmessage('] to [');].
pos('showmessage(''',edit2.Text)+length('showmessage(''')
,pos(''');',edit2.Text)-pos('showmessage(''',edit2.Text)-length('showmessage(''')
)); |
|
|
| Back to top |
|
 |
|