Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Pete317 on September 03, 2008, 10:24:27 pm

Title: Exposing editor functions to scripting
Post by: Pete317 on September 03, 2008, 10:24:27 pm
Hi

This is my first new post here.

I have been using C::B for about a week now (since I 'discovered' it), under both Windows (at work) and Ubuntu (at home), and I find it great.
However, particularly at work, I often have to carry out varied extensive and repetitive editing operations which lend themselves to automation - without which they are tedious and time-consuming.
I thought of using scripting to perform these tasks, however basic editing functions, such as moving the cursor around, highlighting text, searching etc don't seem to be exposed to scripting. Due to the many varied tasks, I don't want to have to write and build a whole bunch of plugins, many of which will only be used once or twice. And, for various reasons, particularly portability amongst teams and sites, I don't want to resort to rebuilding the C::B code.
One possibility for me is to write and build a plugin which would expose the functions I need to scripting.
Is this possible, and does anyone have any tips/advice on the subject?

BTW I'm a C programmer. I can find my way quite reasonably around C++ but I'm no expert

Cheers
Peter
Title: Re: Exposing editor functions to scripting
Post by: MortenMacFly on September 05, 2008, 10:51:41 am
One possibility for me is to write and build a plugin which would expose the functions I need to scripting.
Is this possible, and does anyone have any tips/advice on the subject?
Yes, that might be possible. Have a look at the wxSmith plugin. It exposes a certain script functionality in addition to the one the C::B core (SDK) provides.
Title: Re: Exposing editor functions to scripting
Post by: Pete317 on September 07, 2008, 05:16:29 pm
Yes, that might be possible. Have a look at the wxSmith plugin. It exposes a certain script functionality in addition to the one the C::B core (SDK) provides.

Thanks, but I'm still not sure what I'm supposed to be looking for.
I found:         SqPlus::RegisterGlobal(AddWxExtensions,"WxsAddWxExtensions"); but I'm having a little trouble figuring out how it works or what it does.
Is there any documentation on the sqplus interface?