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

Key Macros plugin

<< < (3/8) > >>

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.3

http://savefile.com/files/420813


changes:
--- Code: ---// ----------------------------------------------------------------------------
//  Commit  0.3.3 2007/01/17 Published
//    1) Escaped recorded user {}!^+ chars in KeyEvtLogr::RecordEvent()
//    2) reverse refactored change header to version.h
//    3) Set recorded macro to Scratch at "stop recording" as well as "play macro"
// ----------------------------------------------------------------------------

--- End code ---

Help entry:

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

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.5

http://savefile.com/files/436447


changes:

--- Code: ---// ----------------------------------------------------------------------------
//  Commit  0.3.5 2007/01/23    Publish
//           4) version.h/cpp rework and editor spelling corrections
//           5) Fixes for crashes when enabled/disabled by Plugin Manager
// ----------------------------------------------------------------------------

--- End code ---

Help entry (Wiki):

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

arst:
Hello,

I've been downloading the KeyMacs 0.3.5 plugin. I've been lacking
macro support in CB. But... when compiling in CB (3521), I receive
a bunch of preprocessor errors, see below.

They all relate to Windows preprocessor symbols, so they are
nowhere defined, neither in CB source folder nor in wxWidgets one.

How should this be compiled?

Thanks,
Arst


:: === KeyMacs-MSW-plugin, default ===
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:35: error: `VK_SHIFT' was not declared in this scope
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:35: error: `MapVirtualKey' was not declared in this scope
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:36: error: `VK_CONTROL' was not declared in this scope
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:37: error: `VK_MENU' was not declared in this scope
....
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:298: error: `byte' was not declared in this scope
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:298: error: expected `)' before "scCode"
:: More errors follow but not being shown.
:: Edit the max errors limit in compiler options...
:: === Build finished: 50 errors, 0 warnings ===

Pecan:

--- Quote from: arst on January 24, 2007, 09:44:15 am ---Hello,

I've been downloading the KeyMacs 0.3.5 plugin. I've been lacking
macro support in CB. But... when compiling in CB (3521), I receive
a bunch of preprocessor errors, see below.

They all relate to Windows preprocessor symbols, so they are
nowhere defined, neither in CB source folder nor in wxWidgets one.

How should this be compiled?

Thanks,
Arst


:: === KeyMacs-MSW-plugin, default ===
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:35: error: `VK_SHIFT' was not declared in this scope
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:35: error: `MapVirtualKey' was not declared in this scope
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:36: error: `VK_CONTROL' was not declared in this scope
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:37: error: `VK_MENU' was not declared in this scope
....
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:298: error: `byte' was not declared in this scope
D:\Proj\Ext\CB\src\plugins\contrib\KeyMacs\MSWrunmacro.cpp:298: error: expected `)' before "scCode"
:: More errors follow but not being shown.
:: Edit the max errors limit in compiler options...
:: === Build finished: 50 errors, 0 warnings ===

--- End quote ---

I'm using gcc 3.4.4 with wxWidgets 2.6.3, so for me the windows headers are being brought in by wxWidgets pre-compiled headers (eg., winuser.h).

Are you using the .cbp provided?

What version of wxWidgets are you using?

What compiler/system are you using?

Could you post your project. I cannot seem to re-create these errors even when turning off precompiled headers.

arst:
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

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version