Author Topic: Exposing editor functions to scripting  (Read 6842 times)

Offline Pete317

  • Single posting newcomer
  • *
  • Posts: 3
Exposing editor functions to scripting
« 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
« Last Edit: September 03, 2008, 10:28:03 pm by Pete317 »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9617
Re: Exposing editor functions to scripting
« Reply #1 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Pete317

  • Single posting newcomer
  • *
  • Posts: 3
Re: Exposing editor functions to scripting
« Reply #2 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?