Author Topic: Alias Module  (Read 1238 times)

0 Members and 1 Guest are viewing this topic.

Marstead

  • Padawan
  • **
  • Posts: 51
  • Karma: +1/-0
    • View Profile
  • Twitch Name: Marstead
Alias Module
« on: January 16, 2018, 04:54:19 AM »
Right now commands can start to get really complicated and difficult to parse, especially when using @readfile@ and @savefile@ commands. It would be very convenient to have a module to specify a list of aliases/shortcuts that will automatically replace itself with the specified text when called.

For example, I could make an alias called %gameDetails%, and define it as @readfile@[C:\Users\MyName\GoogleDrive\gamedetails.txt]. Now, whenever a command includes the text %gameDetails%, it automatically replaces it with @readfile@[C:\Users\MyName\GoogleDrive\gamedetails.txt]. That way if I need to change that text file in the future I only need to update it in the Alias Module and not in every command that calls the same value.

This needn't be specific to text files, it's just a customized shortcut system. So any text entered for %gameDetails% will be retrieved and automatically replace it when it's called. You could use this to store common calculations used across multiple commands, so the calculation needs only to be entered once if it needs to be adjusted in the future.