GoRefreshKeepSelection - A script command that refreshs tabs and tree content, while keeping the current selection and also scrolling back to the selected items (can be disabled).
################################################################ THIS SCRIPT ADDIN IS OUTDATED, please use "GoEx": Command: GoEx (extended Go command functionality)? ################################################################
Description:
I made this to refresh a tab and maintain my selection, because I don't like to lose my selection on refreshs (DO default), simple as that! o)
Params / ScriptConfigs and Features:
DebugOutput, switch to enable printing of details for troubleshooting
NoScrollToSelection, switch to disable scrolling to selected items
ScrollToChecked, switch to priorize checked items when scrolling back to selection
GoRefreshOptions, any valid option for "Go REFRESH"
GoParams, any additional switch or parameter for the "Go" command
Usage:
The usage is quite similar to that of the native "Go REFRESH" functionality.
Native command: Go REFRESH
Script command: GoRefreshKeepSelection
If you'd like to keep selection while refreshing both file displays of a dual lister and also refresh the thumbnails:
Installation:
To install the command, download the *.js.txt file below and drag it to Preferences / Toolbars / Scripts.
After that, you should edit your "F5" hotkey to run "GoRefreshKeepSelection" instead of "Go REFRESH".
v0.2 - major improvements to fully support all "Go REFRESH" options and additional "Go" switches and parameters: Command.GUI_GoRefreshKeepSelection.js.txt (10.1 KB)
I guess I see the reason for your request, but I think you can just run the command twice, whereever you change the default refresh command for GoRefreshKeepSelection to "Go REFRESH=both", or am I wrong?
Thanks for dropping in! o)
EDIT: Oh, I just noticed, "Go REFRESH=dest" is not yet working as it should, so my idea to run it twice won't work. I'll see what I can do about it.
major improvements to fully support all "Go REFRESH" options and additional "Go" switches and parameters
attention: changes in parameter names, config items and maybe general handling
updated the "Usage" section to reflect all changes
@kundal
Thanks for your help! o) But please remove your version. o) It errors for single listers and generally cannot work satisfyingly.
A more generic approach is needed to really take care of selections, checkbox mode and additional refresh options.
I also noticed a possible DO "issue" with Tab.Update(). It seems the method does not update the tab object synchroniously.
So a special handling (looping while updating the tab) is needed to get the script to sync with the GUI again.
Many thanks for the now full-featured script. Works great.
Done.
I know it was a really dirty thing but it worked (maybe only) for my standard usecase: dualpane - no checkbox - refresh all.
I'm far away from your knowledge about scripting and studying/hacking your scripts is always a great challenge and fun for me.
I'm glad to hear! o) Time will tell if it really works stable and covers all use cases, let's hope the best.
The fun is also on my side, so I hope to read you soon - in the GoRegistry thread maybe? o)
After a refresh is done,the first file in the lister is also getting selected including the one on which selection is already there,will u pls correct it
@carter
I just tried the native Go REFRESH command, it also selects the first item (if enabled in the prefs), so my impression is, this is something only Jon and Leo could work on, maybe the auto selection could be skipped upon refresh or whenever some kind of "NOFIRSTITEMSEL" switch is passed to the Go command.