473,382 Members | 1,247 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Executing the code contained in a string?


Is it possible to execute the code contained in a string? I would like to
create a wizard for making a custom "filter" in my software, much the same
as Outlook Express has mail "rules", ie:

Show nodes where the
{condition,action string, condition string, type}
{ equals, doesn't equal, is greater than, is less than }
{ value }
{ and, or }
{condition,action string, condition string, type}
{ equals, doesn't equal, is greater than, is less than }
{ value }

and of course, I can parse this down to something like:

if theItem.Condition = Conditions.Red then
bPassFilter = true
else
bPassFilter = false
end if

Would be great if you could execute "scriptlets" like this and get the
resulting value of bPassFilter.

Is this possible, or can anyone suggest and alternative approach I should
use?

Thanks.
Nov 20 '05 #1
2 1160
Hi,

Maybe this will help.
http://www.codeproject.com/dotnet/DotNetScript.asp

Ken
----------------
"Robin Tucker" <id*************************@reallyidont.com> wrote in
message news:c1*******************@news.demon.co.uk...

Is it possible to execute the code contained in a string? I would like to
create a wizard for making a custom "filter" in my software, much the same
as Outlook Express has mail "rules", ie:

Show nodes where the
{condition,action string, condition string, type}
{ equals, doesn't equal, is greater than, is less than }
{ value }
{ and, or }
{condition,action string, condition string, type}
{ equals, doesn't equal, is greater than, is less than }
{ value }

and of course, I can parse this down to something like:

if theItem.Condition = Conditions.Red then
bPassFilter = true
else
bPassFilter = false
end if

Would be great if you could execute "scriptlets" like this and get the
resulting value of bPassFilter.

Is this possible, or can anyone suggest and alternative approach I should
use?

Thanks.

Nov 20 '05 #2
Awesome, I was wanting to implement something like VBA in one of my apps...
I was thinking about doing the exact same thing this guy did, but now, I
have assistance. =)

Thanks for the link...
-CJ

--- first article coming soon simple skinning in windows forms...

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:OZ****************@tk2msftngp13.phx.gbl...
Hi,

Maybe this will help.
http://www.codeproject.com/dotnet/DotNetScript.asp

Ken
----------------
"Robin Tucker" <id*************************@reallyidont.com> wrote in
message news:c1*******************@news.demon.co.uk...

Is it possible to execute the code contained in a string? I would like to create a wizard for making a custom "filter" in my software, much the same as Outlook Express has mail "rules", ie:

Show nodes where the
{condition,action string, condition string, type}
{ equals, doesn't equal, is greater than, is less than }
{ value }
{ and, or }
{condition,action string, condition string, type}
{ equals, doesn't equal, is greater than, is less than }
{ value }

and of course, I can parse this down to something like:

if theItem.Condition = Conditions.Red then
bPassFilter = true
else
bPassFilter = false
end if

Would be great if you could execute "scriptlets" like this and get the
resulting value of bPassFilter.

Is this possible, or can anyone suggest and alternative approach I should use?

Thanks.


Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: rvdw | last post by:
Hi All, I've a serious problem with executing stored procedures (SQL2000) from an Access db (version 97). After executing a stored procedure , msaccess hangs. The whole call to the procedure is...
14
by: Jay O'Connor | last post by:
Is there a good way to import python files without executing their content? I'm trying some relfection based stuff and I want to be able to import a module dynamically to check it's contents...
67
by: Steven T. Hatton | last post by:
Some people have suggested the desire for code completion and refined edit-time error detection are an indication of incompetence on the part of the programmer who wants such features. ...
1
by: rvdw | last post by:
Hi All, I've a serious problem with executing stored procedures (SQL2000) from an Access db (version 97). After executing a stored procedure , msaccess hangs. The whole call to the procedure is...
10
by: Mike | last post by:
I know this sounds strange but I am at a loss. I am calling a simple funtion that opens a connection to a SQL Server 2000 database and executes an Insert Statement. private void...
5
by: majm | last post by:
I'm trying to implement strongly typed lists in the 2.0 framework. I'm using VS2005 beta 2. So far, System.Collections.Generic.List appears to be the ideal solution. However, the...
0
by: BasicQ | last post by:
I am running an executable from my aspx page with the click of a button. A date is passed as an argument. I am able to get the standardoutput from the Process(Exe) into the label of my page after...
7
by: tshad | last post by:
I thought I understood how the SaveViewState is working and was trying to use this (as per some code I found) to detect refreshes. It seemed to be working but I found that the SaveViewState was...
3
by: shanmukhi | last post by:
hi all, i got a problem with struts. iam unable to find it. i have written an action class, form bean class and a jsp page on submitting form, request is going to action class but it is not...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.