Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Key Macros plugin

<< < (4/8) > >>

Pecan:

--- Quote from: arst on January 24, 2007, 05:26:25 pm ---Hello,

Yes, I'm using the supplied KeyMacs project. On reading your reply,
I worked a bit with it again and got past the Windows preproc
problems. I had to do this (including windows.h and a couple of defines:

// ----------------------------------------------------------------------------
//  MSWrunmacro.cpp
// ----------------------------------------------------------------------------
// RCS-ID: $Id: MSWrunmacro.cpp 15 2007-01-14 05:32:30Z Pecan $

#if defined(__WXMSW__)
 // headers for MSW here

#ifdef wxUSE_UNICODE
#define _UNICODE
#define UNICODE
#endif
#include <windows.h>
Also I had to add the search path to MinGw/Include to the project.

However... I think we get a very direct dependence on MinGw (going
past the wxW layer).

When the compiler continues, I get some other errors (below). They
all concern the PageUp and PageDown keys, where different defines
have the same value, in the switch case.

:: === KeyMacs-MSW-plugin, default ===
C:\wxWidgets-2.8.0\include\wx\wxprec.h:28: warning: "WX_PRECOMP" redefined
:9:1: warning: this is the location of the previous definition
cmdkeytextctrl.cpp:236: error: duplicate case value
cmdkeytextctrl.cpp:221: error: previously used here
cmdkeytextctrl.cpp:237: error: duplicate case value
cmdkeytextctrl.cpp:222: error: previously used here
cmdkeytextctrl.cpp:321: error: duplicate case value
cmdkeytextctrl.cpp:320: error: previously used here
cmdkeytextctrl.cpp:323: error: duplicate case value
cmdkeytextctrl.cpp:322: error: previously used here
:: === Build finished: 8 errors, 2 warnings ===
OK
// Arst


--- End quote ---

I see you're running wxWidgets 2.8.0. I have no confidence that KeyMacs will work with this newest wxWidgets. I've never tried it, and I've never compiled either KeyMacs or CodeBlocks using 2.8.0.

Currently KeyMacs is only supported on wxWidgets 2.6.3

However, KeyBinder had a problem like this with 2.8.0 that was fixed by TimS.
I'll look at that fix and try it with KeyMacs.

Pecan:

--- Code: ---   #if not wxCHECK_VERSION(2, 8, 0)
case WXK_PRIOR:     res << wxT("PgUp");     break;
case WXK_NEXT:      res << wxT("PgDn");     break;
   #endif

--- End code ---

WXK_PRIOR and WXK_NEXT should have guards around them for wxWidgets 2.8.0

arst:
Hello again,

Now I've compiled it and ran it too. It goes OK, the submenu showed
up under Plugins and I recorded some macros. Some problems with
quote key (Shift+2) generating @ instead after a while.

I had to modify a couple of extra files in the same manner (defining
UNICODE, includingwindows.h and the gueards for wxw 2.8.0).
See attached file.

OK,
Ats

[attachment deleted by admin]

Pecan:

--- Quote from: arst on January 25, 2007, 12:11:15 am ---Hello again,

Now I've compiled it and ran it too. It goes OK, the submenu showed
up under Plugins and I recorded some macros. Some problems with
quote key (Shift+2) generating @ instead after a while.

I had to modify a couple of extra files in the same manner (defining
UNICODE, includingwindows.h and the gueards for wxw 2.8.0).
See attached file.

OK,
Ats

--- End quote ---

Thanks arst

What do you mean by:
"Some problems with quote key (Shift+2) generating @ instead after a while."

My quote key is no where near Shift+2. I don't understand. My Shift+2 is an @. Could you explain a little further?

Did the KeyMacs menu item show up under your context menu (right mouse)?

Pecan:
KeyMacs is a Code::Blocks plugin providing the user an ability to group sequences of keystokes as a macro (KeyMac). The KeyMac can be executed by either the main Plugin menu, a menu command key, or the context menu.

Update: KeyMacs v 0.3.8

http://savefile.com/files/441146


changes:

--- Code: ---// ----------------------------------------------------------------------------
//  Commit  0.3.8 2007/01/25    Publish
//           6) Scroll listCtrl "New" Untitled item into view.
//           7) Fixes by arst for wxWidgets 2.8.0
//           8) Disallowed Shift-singleChar as command key. Must start with
//              Ctrl- or Alt- if Shift- is used.
// ----------------------------------------------------------------------------

--- End code ---

Help entry (Wiki):

http://wiki.codeblocks.org/index.php?title=KeyMacs_plugin

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version