User forums > Using Code::Blocks

Change Log: cmd line for export

<< < (2/3) > >>

BlueHazzard:
you can make a squirrel script for this functionality...
read http://wiki.codeblocks.org/index.php?title=Scripting_commands (CallMenu) and her http://wiki.codeblocks.org/index.php?title=Scripting_Code::Blocks for more information.. at the beginning it is a bit difficult, but after a bit you will get into it... ;) if you have a question about scripting feel free to ask...

J.:
Thx, this is very helpful. I think I should call routine avChangesDlg::OnBtnWriteClick. How does this call work in squirrel given the wx arguments which are required?

Many thanks again for your support!

BlueHazzard:
???

you want to make a script, what 1) exprots the changelog, and the calls tortoise?
i would make something like this:


--- Code: ---// Script plugins must extend cbScriptPlugin

class TestPlugin extends cbScriptPlugin
{
    // mandatory to setup the plugin's info
    constructor()
    {
        info = PluginInfo();
        info.name = _T("exportPlugin");
        info.title = _T("exportPlugin");
        info.version = _T("0.1a");
        info.license = _T("GPL");
    }

    // optional to create menubar items
    function GetMenu()
    {
        local entries = ::wxArrayString();
        entries.Add(_T("My Tools/Export"), 1);
        return entries;
    }

    // optional to create context menu entries
    function GetModuleMenu(who, data)
    {
        local entries = ::wxArrayString();
        return entries;
    }
   
    // optional to support ExecutePlugin(pluginNameString)
    function Execute()
    {
        ::ShowMessage(_T("Start export"));
        CallMenu(_("path to the menu entry for exporting the changelog"));
        Execute(_("The tortoirs command"))
        return 0;
    }
   
    // optional calback for menubar items clicking
    function OnMenuClicked(index)
    {
        if (index == 0)
            Execute();
    }

    // optional calback for context menu items clicking
    function OnModuleMenuClicked(index)
    {
    }
}

// this call actually registers the script plugin with Code::Blocks
RegisterPlugin(TestPlugin());

// if you want to call this plugin's Execute() function, use this in a script:
// ExecutePlugin(_T("TestPlugin"));
--- End code ---

greetings

J.:
Many thanks, but a bit easier: The temporary change log file (changelog.tmp) in the CB project folder can be used. There is no additional output required.

Sorry for the late reply. Unfortunately I was away from my desk because of a nasty virus (not one of those catching notebooks).

-J.

LETARTARE:
@BlueHazzard
hello,

--- Quote ---function Execute()
    {
        ::ShowMessage(_T("Start export"));
        CallMenu(_("path to the menu entry for exporting the changelog"));
        Execute(_("The tortoirs command"))
        return 0;
    }
--- End quote ---

Under 'Win32' this call is still not working (svn9778)  >:(

http://forums.codeblocks.org/index.php/topic,15539.0.html
http://forums.codeblocks.org/index.php/topic,16284.0.html
http://forums.codeblocks.org/index.php/topic,16352.0.html
http://forums.codeblocks.org/index.php/topic,16412.0.html

Do you have a solution ?

Thanks

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version