I read your Power Tips from 2009 (List of UltraEdit / UEStudio script commands and most common mistakes
). And that was indeed something I was too "lazy" to do in my code (well I did wanted to ensure "searchDown"), i.e. set up all search modes properly. Ideally I'd want to write a script that gets included, and all you do when working with your scripts is include that "set up". I am not quite sure "include
" in java script works that well, possibly I am confusing that with Grease Monkey
scripts I also tend to work on.
If I remember correctly, the find mode settings are only set temporarily for the script's run, and then UE defaults back to what you have set up before your script was launched?
(If not, one would want to remember the "pre-script-launch-find-settings", remember those, set up the few settings you really will want to make sure they are properly set up, use the temp settings, and then at the end of the script reset those settings.)
Just as a side note about compact programming:
Code: Select all
var main_id = get_view_id(txtlist);
var doc = ue.document[main_id]; // method alias for main file
var doc = ue.document[ get_view_id(txtlist) ]; // method alias for main file
I was very much thinking of one-lining the two lines of code above, to avoid creating a "redundant" variable called mail_id
. I left the code as is to make it a bit easier to read, maybe. What would your preferred approach
be in this case [since main_id
is not used anywhere else in the code]?