Execute Text/String
Hi all
I have a problem with the EbExecuteLine Function, i need execute a String as Function but i dont wont use a API, i need use this function without a API.
The other way is if i use a Object Script control but i don't wont.
I need Execute a line content in string without API's or Script's controls.
For example:
dim var as string
var = form1.caption = "something" | text1.text = variant & variant
Function exec(sData as string)
dim var as string
dim s as string
s = Split(sDara,"|")
Exec s(0)
Exec s(1)
End Function
Thnx :)
# 1 Re: Execute Text/String
You have three ways to parse and execute some code at runtime.
1) Use the Microsoft Scripting Runtime.
2) Use an API.
3) Write your own parser.
So, sounds like you don't want to do #1 and #2, so you get to write your own parser. That isn't too hard if you only have a couple variations that someone could enter to be executed. Just break down the line into command groups (like your form1.caption = "something" line), then break those groups into specific commands. Then analyze that and determine what the outcome is.
# 2 Re: Execute Text/String
Tehx, but, yeah, this is the problem, i dont know how, i need someone code for this function, i dont know where found this...
Thnx anyways.
# 3 Re: Execute Text/String
Then I suggest using #1. It is easier, and will save you a ton of headaches.