macros

Alerting for incorrect cell values

My problem: I have two ranges R16 and R01. These ranges were set up by swiping each range and then renaming them in the upper left panel of the sheet. Each range requires users to fill in each cell with a value. R16 requires users to enter a number of 0 through 5. The range R01 requires a value of 0 or 1 to be entered. NO cell can be lef...

Macro doesn't work in the function.

I have problems with following code: http://lisper.ru/apps/format/96 The problem is in "normalize" function, which does not work. It fails on the fifth line: (zero-p a indexes i) (defun normalize (a &optional indexes i) "Returns normalized A." (progn (format t "Data=~A ~A ~A" a indexes i) (if (zero-p a indexes i) a ;; c...

How are vector patterns used in syntax-rules?

Hi, I have been writing Common Lisp macros, so Scheme's R5Rs macros are a bit unnatural to me. I think I got the idea, except that I don't understand how one would use vector patterns in syntax-rules: (define-syntax mac (syntax-rules () ((mac #(a b c d)) (let () (display a) (newline) (display d) (...

Is there any way to trigger some macro after build in visual studio

I want to count how many times i built on VS.NET . I have a plan. If i run svn commit when i build to project, i would have build count on revision number :) I didn't write any macro which can execute a command. And i don't know visual studio is allowing to prebuild event for this kind of request. ...

Current Line For Visual Studio Macros

How can I read text of a current line (where cursor is situated) from Macros? I'm going to use such a function: Public Sub AddTextToChangeLogFile() Dim textOnACurrentLine As ??? textOnACurrentLine = ??? If textOnACurrentLine.Text <> String.Empty Then Dim sw As New StreamWriter("C:\###\Changes.txt", True) s...

Excel Macro to create sheets

I have a Excel sheet with two columns and I need to create new sheets based on the values of the first column.ie A B test1 Value21 test1 Values22 test2 Value21 test2 Value32 test3 Values32 IN this case I need to create three sheets namely test1,test2 and test3 Sheet 1 should contain test1 field and its correspon...

Macro to copy data from one sheet to another based on the current date

Does anyone have a macro that copy data from one sheet to another based on the current date? I am working with a single workbook of three sheets. Sheet one will hold the manual input of daily production figures for multiple plants, sheet two is to hold ongoing daily data, keyed on sheet one. The macro will be associated with a button,...

how can I create macro definitions for the lines commented in the code.

#include <stdio.h> //Here use a macro definition that assigns a value to SIZE (for example 5) int main() { int i; int array[SIZE]; int sum=0; for(i=0; i<SIZE; i++) { //Here use a macro definition named as CALCSUM to make the //following addition operation for the array ...

Visual Studio Macro To Switch Solution Configuration

I'm trying to write a macro that toggles between release/debug solution configurations in Visual Studio. It appears I can switch the configuration by using 'DTE.ExecuteCommand("Build.SolutionConfigurations", "Debug")'. Is there a way I can 'read' the value? Or is there a way I can use macros to 'focus' on the solution configuration UI...

How Display Excel rows on selection of first Excel Column Value

Hi, I have Two Excel sheets. My requirement is when i select Reason Value From First Excel sheet Reason Column. It will display respected Reason Value in Second Excel. So using Macro i want to Display Second Excel Rows on selection of reason in first excel. Please Help. First Excel is And Reason Column Contains Reason1 , Reason 2 et...

How to get a particular part of a String

I am writing a macro in Excel where I need to get a substring from a String. Its like this. ~/tester/test/hai/bye ~/stack/overflow/hai/bye In the above cases I need to take the String tester from the first one and stack from the second one.I tried using the Instr but its not useful.Can anyone help this? ...

comparing the sheet 1 coloumn data with sheet 2 coloumn data

hi, i have two sheets sheet1: A Candesartan, apririn, drug xyz eee, drug abc aaa, drug lkl, drug aaa, drug bbb, drug ccc Livalo, anotherC, anotherD, AnotherE, morea, moreb, morec, mored, moree, moref, moreg,drug, sheet2: A drug abc drug a drug b drug c drug abcd i ahve to comapre these two and insert the sheet1 value that is no...

Best IDE macro tools to combat the verbosity of Java syntax?

Does anyone have any recommendations for tools that you can add to Eclipse, Netbeans or other IDEs to produce some of the repetitive code that's common in Java syntax? ...

visual studio macro - getting started | copy a definition from .cpp to .h

Is it possible to do a macro that copies a definition of a function to a declaration(, and maybe also the opposite)? For instance Foo::Foo(int aParameter, int bParameter){ // } int Foo::someMethod(char aCharacter) const { return 0; } from the .cpp file would be: class Foo { Foo(int aParameter, int bParameter); i...

Examples of what Lisp's macros can be used for

I've heard that Lisp's macro system is very powerful. However, I find it difficult to find some practical examples of what they can be used for; things that would be difficult to achieve without them. Can anyone give some examples? ...

How do you detect multiple iphone OS, equal to and greater than, using macros?

Hi, I am trying to execute different things depending on what os the users iPhone is using. Currently I have the below, which says - "if the device is 3.1, post this message" #ifdef __IPHONE_3_1 NSLog(@"this device is 3.1"); #endif But, How can I get it to say - "If the device is 3.1 or higher, post this message" ? ...

Macros for GCC/G++ to differentiate Linux and Mac OSX?

Macros for GCC/G++ to differentiate Linux and Mac OSX? ...

Block users using auto-clickers

I'm having some problems with users cheating my online game by using macros to automatically click certain spots on the screen in a certain order to automate various tasks without having to actually be playing the game. Are there any methods that can be used to block this kind of activity without having to plaster CAPTCHAs all over the ...

Macros in C.... please give the solution

suppose i declared a macro name anything, xyz() and now i am creating another macro xyz1() and referencing the 1st macro i.e xyz() in 2nd. finally i'll create another macro xyz2() and referencing 2nd macro in 3rd... now my question is is this correct(its executing without any problem)..? and macro xyz() is defined twice.... why its no...

When was the NULL macro not 0?

I vaguely remember reading about this a couple of years ago, but I can't find any reference on the net. Can you give me an example where the NULL macro didn't expand to 0? Edit for clarity: Today it expands to either ((void *)0), (0), or (0L). However, there were architectures long forgotten where this wasn't true, and NULL expanded to...