Save this script in your script folder (<xyscripts> in the address bar + enter)
as: SwitchSortOrder.xys
Code: Select all
perm $P_SortOrder;
if (!$P_SortOrder || $P_SortOrder == "m") { sortby "name", "a"; $P_SortOrder = "n"; }
elseif ($P_SortOrder == "n") { sortby "modified", "d"; $P_SortOrder = "m"; }
writepv;
- Right click on the toolbar, "Customize Toolbar..."
- Scroll down on the left side until you see the "User Buttons #<number>" buttons
- Choose the first, click on "Add ->", place it at the desired position with "Up" | "Down"
- Right click the new button on the toolbar, "Edit..."
- Choose a "Name:", evtl. an "Icon:" and in the "On left click:" field
Paste this: ::load "SwitchSortOrder.xys";
- Click "OK" and close the dialog
- Menu - User - Manage Commands...
- Click on "Load Script File" on the left side
- Click on "New..." on the upper right side
- Choose "Add New Command"
- Give it a caption, in "Script File:" enter:
SwitchSortOrder.xys
- Click on "Assign Keyboard Shortcut..." and choose one