Feature Request: Script to force refresh

Features wanted...
Post Reply
PixelDrop
Posts: 38
Joined: 23 Jan 2018 20:43

Feature Request: Script to force refresh

Post by PixelDrop »

I'd like to request the ability to force a refresh in scripting.

My reason: So that when I apply a tag with a script I can have the script than refresh the view so that the newly tagged image will be hidden by the global filter that filters out files tagged with that tag.

At the moment I have to manually hit F5 every time I tag an image to get the view to update, as auto-refresh doesn't seem to acknowledge new tags as a reason to auto-refresh.

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Feature Request: Script to force refresh

Post by highend »

Code: Select all

#485;
?
One of my scripts helped you out? Please donate via Paypal

PixelDrop
Posts: 38
Joined: 23 Jan 2018 20:43

Re: Feature Request: Script to force refresh

Post by PixelDrop »

Seems to work, thank you!

I've never ran into these #codes before in the Scripting Commands Reference help file. Maybe a better request would be adding a section in the help file for these codes. :D

I searched for every context of refresh/reload...etc I could think of and came up empty handed.
Even doing a search for just "485" in the help file comes up empty so it would seem to simply not be listed anywhere that is searchable at least.

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Feature Request: Script to force refresh

Post by highend »

Imho it doesn't make sense to list 696 ids in the help file :mrgreen:

Menu - Help - List All Commands...

Shows them all
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 60591
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Feature Request: Script to force refresh

Post by admin »

Note also this new command:

Code: Select all

    + Scripting got a new command.
      Name: RefreshList
      Action: Refreshes the list on any of the panes.
      Syntax: refreshlist [pane="a"]
        pane:
          a = [default] active pane
          i = inactive pane
          1 = pane 1
          2 = pane 2
      Examples:
        refreshlist;      //refresh active pane
        refreshlist "i";  //refresh inactive pane

jupe
Posts: 2794
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Feature Request: Script to force refresh

Post by jupe »

Although since the new SC refreshlist has been added it won't be required anymore, but as a stand in substitute for the same function as F5 (active pane only), this also could have been used, without resorting to Command IDs:

Code: Select all

	button "refresh";

admin
Site Admin
Posts: 60591
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Feature Request: Script to force refresh

Post by admin »

Cool idea. Had to think twice before I believed it. :tup:

Post Reply