| View previous topic :: View next topic |
| Author |
Message |
Haxory' Grandmaster Cheater Supreme
Reputation: 92
Joined: 30 Jul 2007 Posts: 1900
|
Posted: Fri May 02, 2008 3:50 am Post subject: [VB6] simple costum language |
|
|
How could you make something like a simple costum language?
For instance:
In a textbox you enter:
How could I make vb execute the code "Text1.Text = "your text"" without using a source code?
I hope you understand my question, if you don't i will explain again XD
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel |
|
| Back to top |
|
 |
FireShock Master Cheater
Reputation: 0
Joined: 14 Apr 2007 Posts: 324 Location: :niotacoL <- It's a mirror
|
Posted: Fri May 02, 2008 3:54 am Post subject: |
|
|
I don't fully understand your question,
Do you mean like this:
| Code: | | Call ShockWaveFlash1.Setvariable("your.var", TextBox1.Text) |
_________________
|
|
| Back to top |
|
 |
Haxory' Grandmaster Cheater Supreme
Reputation: 92
Joined: 30 Jul 2007 Posts: 1900
|
Posted: Fri May 02, 2008 4:09 am Post subject: |
|
|
you can edit a textbox's text too, so that for instance if you would enter Text1("w/e") Visual Basic should translate this to Text1.text = "w/e"
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel |
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Fri May 02, 2008 4:42 am Post subject: |
|
|
| haxory' wrote: | | you can edit a textbox's text too, so that for instance if you would enter Text1("w/e") Visual Basic should translate this to Text1.text = "w/e" |
if you enter text1("w/e") where?
_________________
|
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Fri May 02, 2008 4:55 am Post subject: |
|
|
i wish i knew how to do this, convert a string to a function name so like you type "MyFunc(1, 2)" into a text box and it uses the MyFunc function, with those parameters (without a crap loads of ifs mind you)
_________________
|
|
| Back to top |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
Posted: Fri May 02, 2008 8:51 am Post subject: |
|
|
You mean taking input at runtime and compiling it on the fly?
That would be a lot of work...
Maybe you could convert the input into ASM and then into hex, then throw it into an array and point a function pointer at it and call that. No idea if it'd really work, though.
_________________
|
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Fri May 02, 2008 8:59 am Post subject: |
|
|
no, not that complicated, something like:
| Code: | if TextBoxCommand.text = "SleepFor" then
SleepFor(StrToInt(TextBoxParam.text) |
So the functions name is in the first box, and the paramaters in the second one
Im basically trying to do this, without an if for evey option though
_________________
|
|
| Back to top |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
Posted: Fri May 02, 2008 9:18 am Post subject: |
|
|
After you comile, thgere's no longer a "My func", just a function at 0042839a. I think you'd have to make a function that takes in a name and indexes that to the function. Yes, it would take a lot of ifs, but atleast it would all be secluded into one function.
But that doesn't help OP with his "custom language"
EDIT:
There's this thing in java called a hashmap which lets you set a key to a value. I believe the VB equivalent is the collection object:
http://msdn.microsoft.com/en-us/library/yb7y698k(VS.80).aspx
This would allow you to set a string key to a function pointer value.
_________________
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8588 Location: 127.0.0.1
|
|
| Back to top |
|
 |
Haxory' Grandmaster Cheater Supreme
Reputation: 92
Joined: 30 Jul 2007 Posts: 1900
|
Posted: Fri May 02, 2008 10:40 am Post subject: |
|
|
thanks a lot guys
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel |
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Sat May 03, 2008 2:26 am Post subject: |
|
|
thanks wicaan, that's exactly what i meant
_________________
|
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Sat May 03, 2008 6:28 am Post subject: |
|
|
I've searched and searched, but haven't find one for Delphi.
Have you got any links?
Or could anyone send me a txt file with the source code?
|
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Sat May 03, 2008 7:29 am Post subject: |
|
|
| Thank ya
|
|
| Back to top |
|
 |
minium haxor Advanced Cheater
Reputation: 0
Joined: 03 Dec 2007 Posts: 82 Location: Faroe islands
|
Posted: Mon Jun 02, 2008 3:03 pm Post subject: |
|
|
are you making a translator? if so then i can help
_________________
|
|
| Back to top |
|
 |
|