RE: Re: Need to write a macro for wincvs
"Aziz Ahmed" <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.gui.user |
|---|---|
| Message-ID | <[email protected]> |
Thanks a lot King ..This is a very good starting point for me. Regards, Aziz. >From: "kingcrustybun" <[email protected]> >Reply-To: [email protected] >To: [email protected] >Subject: [cvsgui] Re: Need to write a macro for wincvs >Date: Fri, 08 Sep 2006 15:12:59 -0000 > >Aziz, > >I am no expert myself but here is what i do based on the example >macros. Do the following 5 steps in a single .py file and place the >file in the macros folder of wincvs. > >1. For each macro i create a class which is based on the Macro base >class, eg. >class MyFirstMacro(Macro): > >2. In the constructor i add the macro to the menu, eg. >Macro.__init__(self, "My First Macro", MACRO_SELECTION, 0, "Aziz Macros") > >3. Add a 'Run' method to the class. This is called when the wincvs >user selects to execute the macro from the menu, eg. >def Run(self): > >4. In the run method, create an instance of the console (if you want >to output messages to the macro user), eg. >console = ColorConsole () > >5. Instantiate your new class by calling the class, eg. >MyFirstMacro() > >So the above 5 steps will result in the following: > > >class MyFirstMacro(Macro): > def __init__(self): > Macro.__init__(self, "My First Macro", MACRO_SELECTION, 0, >"Aziz Macros") > def Run(self): > console = ColorConsole () > # Here you put commands which implement the macro > >MyFirstMacro() > > >You will then do the work in the Run method. >There is a lot more to wrting a useful macro, but you did ask how to >get started :) > >hope this helps > >cheers > > > _________________________________________________________________ Discover. Explore. Connect-Windows Live Spaces. Check out! http://www.msnspecials.in/windowslive/livespaces.asp Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/cvsgui/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/cvsgui/join (Yahoo! ID required) <*> To change settings via email: mailto:[email protected] mailto:[email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/