Thread: [Dev-C++] Costum script at runtime?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Maarten de V. <maa...@gm...> - 2006-12-06 16:16:48
|
Hi, I want my users to be able to write custom script at runtime which will then be executed when a shortcut is pressed. Ofcourse, I could write a simple parser with limited abilities to provide all the functionality they need, but that would be a lot of work. It also requires if statements. Is there a way to execute custom C++ scripts at runtime? Thanks, Maarten |
|
From: Per W. <pw...@ia...> - 2006-12-06 16:30:19
|
C++ scripts? There are some implementations for interpreted C++ around, but are you actually interested in C++ scripts? Add an interface where your application exports a number of functions for use by java. It shouldn't be too hard then for an end user to write small java applets to be executed. There are also a large number of open-source scripting languages that you might select. /Per W On Wed, 6 Dec 2006, Maarten de Vries wrote: > Hi, > > I want my users to be able to write custom script at runtime which will then > be executed when a shortcut is pressed. Ofcourse, I could write a simple > parser with limited abilities to provide all the functionality they need, > but that would be a lot of work. It also requires if statements. Is there a > way to execute custom C++ scripts at runtime? > > Thanks, > Maarten > |
|
From: Maarten de V. <maa...@gm...> - 2006-12-06 16:49:06
|
Well, that would be nice if I wanted them to make plugins. But I just have a field where they should enter the script which then will be executed. More specifically, I'm making a virtual piano. I want the user to be able to decide what happens when they press a certain key combination. So, it would be easy if it could simply be written in C++ so they have total control over everything. When I was still working with REALBasic (a VB like language), I could simply add an object to a window and it could executes whatever you gave it. Is there something like this, or do I have to write a simple parser to do it? Maarten On 12/6/06, Per Westermark <pw...@ia...> wrote: > > C++ scripts? There are some implementations for interpreted C++ around, > but are you actually interested in C++ scripts? > > Add an interface where your application exports a number of functions for > use by java. It shouldn't be too hard then for an end user to write small > java applets to be executed. > > There are also a large number of open-source scripting languages that you > might select. > > /Per W > > On Wed, 6 Dec 2006, Maarten de Vries wrote: > > > Hi, > > > > I want my users to be able to write custom script at runtime which will > then > > be executed when a shortcut is pressed. Ofcourse, I could write a simple > > parser with limited abilities to provide all the functionality they > need, > > but that would be a lot of work. It also requires if statements. Is > there a > > way to execute custom C++ scripts at runtime? > > > > Thanks, > > Maarten > > > > |
|
From: Per W. <pw...@ia...> - 2006-12-06 17:14:37
|
They can never get tocal control of everything unless they write a dll file, that you load. This also requires that you export all symbols. For a plugin (any language) to be able to access a function in a program, that program must be exported unless we are talking about programs that fakes menu choices or button presses. The reason I mentioned Java is that it is quite easy to have the user enter source code, and then exec the compiler to generate a runnable module. But if you check at open-source script languages. Several existing have support where you export a number of functions that the script language may access. /Per W On Wed, 6 Dec 2006, Maarten de Vries wrote: > Well, that would be nice if I wanted them to make plugins. But I just have a > field where they should enter the script which then will be executed. More > specifically, I'm making a virtual piano. I want the user to be able to > decide what happens when they press a certain key combination. So, it would > be easy if it could simply be written in C++ so they have total control over > everything. > > When I was still working with REALBasic (a VB like language), I could simply > add an object to a window and it could executes whatever you gave it. Is > there something like this, or do I have to write a simple parser to do it? > > Maarten > > > On 12/6/06, Per Westermark <pw...@ia...> wrote: > > > > C++ scripts? There are some implementations for interpreted C++ around, > > but are you actually interested in C++ scripts? > > > > Add an interface where your application exports a number of functions for > > use by java. It shouldn't be too hard then for an end user to write small > > java applets to be executed. > > > > There are also a large number of open-source scripting languages that you > > might select. > > > > /Per W > > > > On Wed, 6 Dec 2006, Maarten de Vries wrote: > > > > > Hi, > > > > > > I want my users to be able to write custom script at runtime which will > > then > > > be executed when a shortcut is pressed. Ofcourse, I could write a simple > > > parser with limited abilities to provide all the functionality they > > need, > > > but that would be a lot of work. It also requires if statements. Is > > there a > > > way to execute custom C++ scripts at runtime? > > > > > > Thanks, > > > Maarten > > > > > > > > |
|
From: Maarten de V. <maa...@gm...> - 2006-12-06 19:22:31
|
Yeah, but I think it's to complicated. I'll just write a simple parser to execute some predefiend checks and commands. But thanks for your help. Maarten On 12/6/06, Per Westermark <pw...@ia...> wrote: > > They can never get tocal control of everything unless they write a dll > file, that you load. This also requires that you export all symbols. > > For a plugin (any language) to be able to access a function in a program, > that program must be exported unless we are talking about programs that > fakes menu choices or button presses. > > The reason I mentioned Java is that it is quite easy to have the > user enter source code, and then exec the compiler to generate a > runnable module. > > But if you check at open-source script languages. Several existing have > support where you export a number of functions that the script language > may access. > > /Per W > > On Wed, 6 Dec 2006, Maarten de Vries wrote: > > > Well, that would be nice if I wanted them to make plugins. But I just > have a > > field where they should enter the script which then will be executed. > More > > specifically, I'm making a virtual piano. I want the user to be able to > > decide what happens when they press a certain key combination. So, it > would > > be easy if it could simply be written in C++ so they have total control > over > > everything. > > > > When I was still working with REALBasic (a VB like language), I could > simply > > add an object to a window and it could executes whatever you gave it. Is > > there something like this, or do I have to write a simple parser to do > it? > > > > Maarten > > > > > > On 12/6/06, Per Westermark <pw...@ia...> wrote: > > > > > > C++ scripts? There are some implementations for interpreted C++ > around, > > > but are you actually interested in C++ scripts? > > > > > > Add an interface where your application exports a number of functions > for > > > use by java. It shouldn't be too hard then for an end user to write > small > > > java applets to be executed. > > > > > > There are also a large number of open-source scripting languages that > you > > > might select. > > > > > > /Per W > > > > > > On Wed, 6 Dec 2006, Maarten de Vries wrote: > > > > > > > Hi, > > > > > > > > I want my users to be able to write custom script at runtime which > will > > > then > > > > be executed when a shortcut is pressed. Ofcourse, I could write a > simple > > > > parser with limited abilities to provide all the functionality they > > > need, > > > > but that would be a lot of work. It also requires if statements. Is > > > there a > > > > way to execute custom C++ scripts at runtime? > > > > > > > > Thanks, > > > > Maarten > > > > > > > > > > > > > > |
|
From: Michael S. <so...@ea...> - 2006-12-06 22:00:27
|
Maarten de Vries wrote: > Hi, > > I want my users to be able to write custom script at runtime which > will then be executed when a shortcut is pressed. Ofcourse, I could > write a simple parser with limited abilities to provide all the > functionality they need, but that would be a lot of work. It also > requires if statements. Is there a way to execute custom C++ scripts > at runtime? > > Thanks, > Maarten > >------------------------------------------------------------------------ > >------------------------------------------------------------------------- >Take Surveys. Earn Cash. Influence the Future of IT >Join SourceForge.net's Techsay panel and you'll get the chance to share your >opinions on IT & business topics through brief surveys - and earn cash >http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > >------------------------------------------------------------------------ > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > |