Retaining variables between calls to a macro?
Submitted by Monday, 8 August, 2005 - 12:18
on
Hi,
I'm writing a macro which, during its execution, creates a few variables. I'd like
to somehow save or retain these variables (and their contents) when the macro ends, so
that they can be referred to the next time I execute the same macro (or indeed some other
macro). Is this possible?
At first, I thought maybe I could declare the variables as 'static', but this doesn't seem
to work. I suppose another way of saving information between calls, might be to put
the data into some of the JEdit clipboard registers. Can someone suggest a good
solution to this problem?
Also, is there some class or method that my macro can call that will tell it what the
last key the user pressed was? And what about the last macro that was executed?
Any help would be most appreciated.
Thanks.
I'm writing a macro which, during its execution, creates a few variables. I'd like
to somehow save or retain these variables (and their contents) when the macro ends, so
that they can be referred to the next time I execute the same macro (or indeed some other
macro). Is this possible?
At first, I thought maybe I could declare the variables as 'static', but this doesn't seem
to work. I suppose another way of saving information between calls, might be to put
the data into some of the JEdit clipboard registers. Can someone suggest a good
solution to this problem?
Also, is there some class or method that my macro can call that will tell it what the
last key the user pressed was? And what about the last macro that was executed?
Any help would be most appreciated.
Thanks.