Author Topic: Real nOOb question about macros  (Read 3273 times)

TheHumbleOne

  • Community Member
  • Posts: 34
  • Hero Points: 1
Real nOOb question about macros
« on: October 21, 2011, 10:44:54 pm »
Guys:

I want to start using SlickEdit macros, but can't seem to make them work.  Here is what I am talking about:  I visit this page (http://myslickeditmacros.blogspot.com/2009/03/character-word-and-line-count-for.html) which has a cool macro that I want to start using.  I see the macro code posted on the website, but how EXACTLY do I use this code?

I am using SE 15.0.1.3 on Windows XP and have tried all sorts of things to import this macro code.  I have also read the documentation, but can't seem to figure out how to do this.  Can somebody help with "click here and then click here" kind of instructions?

Thanks!

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: Real nOOb question about macros
« Reply #1 on: October 22, 2011, 01:26:52 am »
1.  Open the macro source file in the editor.
2.  Click the menu command Macro | Load Module...

Graeme

  • Senior Community Member
  • Posts: 2447
  • Hero Points: 322
Re: Real nOOb question about macros
« Reply #2 on: October 22, 2011, 07:42:05 am »
With the example you have linked to, you need to copy the code into a source file, say, macro1.e.  Then you need to add #include "slick.sh" at the start of the file and save it.  Then load it using the load module command on the macro menu.  If an error occurs when the file is compiled, it will be shown on the status bar.  Once successfully compiled/ loaded, you can run the command by typing wc on the command line or binding a key to it using tools -> options .... key bindings.

See also the blog post here
http://blog.slickedit.com/category/macro-programming/
- lets make a macro part 1.
Also try recording a macro - it's a great way to get to know macros.
And read the slick help file section "slick c macro programming" - especially the stuff at the start.

Graeme

TheHumbleOne

  • Community Member
  • Posts: 34
  • Hero Points: 1
Re: Real nOOb question about macros
« Reply #3 on: October 24, 2011, 09:18:18 pm »
Thanks a lot.  Now it's all working fine.