macros

Visual Studio Breakpoint Macro to modify a value?

I'm debugging an application (C++), and I've found a point in the code where I want to change a value (via the debugger). So right now, I've got a breakpoint set, whereupon I do: Debugger reaches breakpoint I modify the variable I want to change I hit F5 to continue running lather, rinse, repeat It's hitting this breakpoint a lot, s...

How to import external module in python macro for OpenOffice?

Hello :) I'm writing a macro for OpenOffice in python, and I have a problem. I want to import external module (gdata) so i write import uno import gdata.calendar.service but when I try execute macro (Tools -> Marcos -> Run Macro..) I always get ImportError :/ I have gdata module in my PYTHONPATH, it's working when I test it in interp...

macro in loops?

for(x;x<crap;x++){ macro(x,y); } how is this handled by preprocessor? is the loop unrolled or something else? ...

Missing Visual Studio 2010 Sample Macros

In my Visual Studio 2010 Macro Explorer I have the "Samples" folder but it is empty. Everything I read seems to indicate that these should have been installed automatically. I ran Setup again to see if it was a feature that I missed but there was no option. Any ideas how I can get the sample macros? Thanks! ...

[VS 2010] How to delete all comments in a selected code section?

Every once in a while, my code gets littered with many useless comments, most of them are obsolete lines of code, and some are obsolete "memos to self". So I was wondering if there's a way to just select a code section, and with some magic key combination or macro, delete all of those. Thanks. ...

Tutorials/manuals for writing class and style files in LaTeX?

I've searched the net and stackoverflow and found a number of great LaTeX sources, but I couldn't find any decent manual about writing your own class and style files. Some issues I have is which part of the code should be in a class file and which in a style file, how to finetune macros, how to define and use variables,... I figured so...

Mechanics of variable capture with define-macro in Scheme

Hello, Consider this unhygienic Scheme macro: (define-macro for (lambda (i i1 i2 . body) (let ((start (gensym)) (stop (gensym)) (loop (gensym))) `(let ((,start ,i1) (,stop ,i2)) (let ,loop ((,i ,start)) (if (< ,i ,stop) (begin ,@body ...

C macro computing the number of bytes that a given compile-time constant requires

Often I have some compile-time constant number that is also the upper limit of possible values assumed by the variables. And thus I'm interested in choosing the smallest type that can accomodate those values. For example I may know that variables will fit into <-30 000, 30 000> range, so when looking for a suitable type I would start wit...

Change page numbers in MS Word 2007 using macros

Hello All, I would like to change page number of all odd pages to page number of even page before that using macros in MS 2007. Can you help me on this? ...

Advanced Find & Replace / Text Expand / Macros

Hopefully a nice quick one for someone. I'm working on a project that requires a specific link being written around 400 or so locations. Each link is the same, except it has the town's name in it, such as: <li><a href="/contact-details.html?location=Andover">Andover</a></li> I'm currently using Komodo Edit to write my projects, and I ...

Get macros written in Word 2003 to function in Outlook 2007

I've been asked to find out how to get a collection of Word macros that used to run in Outlook 2003 running with Outlook 2007. If there is no way to do this, I will need some different options on what to do with them as apparently Word is not an option to use as an editor anymore in Outlook 2007. Other than rewriting them all, what can ...

Outlook 2007 event handler for connection status change

Is it possible to write an Outlook macro that will launch an alert (external application) if/when Outlook's connection status changes from 'Connected to Microsoft Exchange' to Offline or Disconnected. I've found numerous examples regarding instantiation of an Outlook session in a .Net application and using the ExchangeConnectionMode pro...

Embedded C function macro problem

Hello, I came across this in embedded hardware using C. #define EnterPWDN(clkcon) ( (void (*)(int))0xc0080e0 ) (clkcon) I have no idea how is this function macro working. I understand clkcon is the function parameter to EnterPWDN, but what is happening after that? ...

What's such macro for ?

#define ValidateReadPtr(p,cb) 0 I can't think of a use case for this kind of macro,what about you? ...

C++ void cast and operator comma in a #define

I found this while reading some source code. #define MACRO(x) if((void) 0, (x)); else some_func(); I don't fully understand the reasons behind that operator comma and the void cast. This has probably something to do with macro protection, I know that (void)0 is used sometimes to protect cascading elses in macros such as in if(...) t...

Built-in preprocessor token to detect iPhone app target

Hi, I need to set up correctly the FIRM ID for my app(according to target).For example I wrote in my Distribution.h the following lines: #define X_FIRM_ID @"X" #define XX_FIRM_ID @"XX" #define FIRM_ID XX_FIRM_ID For each build that I made I must manually change the FIRM_ID.I want to this automatically, just like I do for Default.png...

C#/.NET Macro Recording and Playback

I'm in charge of taking an Excel VBA app and turning it into a stand alone piece of software. The main point of the functionality is to be able to record macros and play them back, think Website testing, mass SAP entries, anything a macro would be good for. I am not looking to re-invent the wheel, but I won't have the ability to install ...

Is there an equivalent of DoEvents in Visual Studio macros?

Title says it all, I've got a long-running macro, in which I write periodic messages to Output just so that the user know somethings happening. The problem is that the output doesn't get shown until the macro has finished (unless you have the Continue Waiting? dialog box open, strangely enough). Is there anyway to 'flush' the event queu...

Importing data from SQL database in Excel 2003 VS Excel 2010 (VBA)

Hi, this is my first post, so I appologize if some of the formatting is not as it is usually expected. Please let me know if I've done something wrong. So, my company finally upgraded to MS Office 2010. Up untill now I've been working in 2003. I am a sql programmer, and I constantly create reports in excel that pull data from our dat...

How to prevent macro redefinition

Hi all, after working some time in my project, this warning begin to appear: 2>Game.cpp 2>c:\program files\microsoft sdks\windows\v6.0a\include\windef.h(126) : warning C4005: 'APIENTRY' : redefinición de macro 2> c:\users\ferran\directo\gameprojects\dev-libs\glfw\include\glfw.h(72) : vea la definición anterior de 'APIENTRY' 2>c:...