Reply To: setting MEW variables from a source file

Product Compare Forums Multi-Edit Support setting MEW variables from a source file Reply To: setting MEW variables from a source file

Michal Vodicka

If I understand correctly what you need which may not be the case, variables don’t need to survive MEW restart. It’d make things a bit easier but still I’m affraid some macro programming is necessary.

You could associate variables with Window_Id as it is unique per window i.e. create variables like this:

[code:2hfbp3bg]str VarName = Prefix + str(Window_Id);[/code:2hfbp3bg]

It won’t handle the situation where the same file is loaded in several windows at once. For this case file name has to be used some way. If base file name is sufficient, simply use it, if pathname is necessary, use FileToGlobalVarName macro. Next possibility is to use buffer properties which can be the best until MEW restart has to be handled.

In any case you need to write own macro which’d have to handle <-PROMPT~Var> and stores variable modified way i.e <!MyPrompt /V=VarPrefix> and similar for restore. There is no need to modify system code and macros should be rather easy.