Author Topic: How to use a user-defined macro  (Read 1181 times)

TheHumbleOne

  • Community Member
  • Posts: 48
  • Hero Points: 1
How to use a user-defined macro
« on: January 30, 2023, 07:04:23 PM »
I want to know how I can load and use a user-defined macro. I looked into the documentation, but did not find a clear step-by-step method of using a user-defined macro.

Background: I needed a way to get character count for a file. When I did a Google search, I came across this solution that was posted by another SlickEdit user:
https://community.slickedit.com/index.php?topic=5820.0
I see the code that this user has posted; the question is, how do I use the code? Specifically, I need to know:

- What should be the file extension for the user-defined code?
- Where to save this file?
- How to use this code?

Thanks for any help.


Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2906
  • Hero Points: 153
Re: How to use a user-defined macro
« Reply #1 on: January 30, 2023, 08:56:12 PM »
I want to know how I can load and use a user-defined macro. I looked into the documentation, but did not find a clear step-by-step method of using a user-defined macro.

Background: I needed a way to get character count for a file. When I did a Google search, I came across this solution that was posted by another SlickEdit user:
https://community.slickedit.com/index.php?topic=5820.0
I see the code that this user has posted; the question is, how do I use the code? Specifically, I need to know:

- What should be the file extension for the user-defined code?
.e

- Where to save this file?
Anywhere you like, but add that path to the VSLICKPATH environment variable so that it will be reloaded the next time you open the editor.


- How to use this code?
  • Go to Macro>Load module... and choose that file
  • Run the count_selchars macro on the SlickEdit command line, or bind it to a key