Loop scroll with arrow keys

You can use command.IsSet in scripts to test the same things @if does in basic buttons.

Simple example here: Multiple file and inline rename


Following the reply of @AlbatorV, I try to separate in the script VIEW mode by comma after @if:set instead of write @if:set one by one.

I don't understand why in this case it works perfectly (affected to up key):

@if:set VIEW=Details,Power
Select PREV MAKEVISIBLE=immediate
Select PREV=row

But not if I affect this one to right key:

@if:set VIEW=Details,Power
Select NEXT MAKEVISIBLE=immediate

If I remove the Power after the comma, it works in details mode:

@if:set VIEW=Details
Select NEXT MAKEVISIBLE=immediate

Sorry for this very trivial question, but I don't understand where I'm wrong.

@if:set VIEW=Details,Power is the same as @if:set VIEW=Power -- adding the extra Details, isn't doing anything there.

set VIEW=Details,Power is a command which toggles between Details and Power modes and will appear activated when in Power mode. The activation state is what @if:... tests.

Understood (I think :blush:)
But what if I want to test if VIEW is in Details OR in Power
Do I have no choice but write:

@if:set VIEW=Details
@if:set VIEW=Power
Select NEXT MAKEVISIBLE=immediate

Thank you for your patience...

I think it's that or a script.

Problem, when tree is focus, nothing happen... :confused:

Option Explicit
Function OnClick(ByRef clickData)
	Dim cmd
	Set cmd = clickData.func.command

	If cmd.IsSet("focus=filedisplay") Then 
		If cmd.IsSet("VIEW=Details") Or cmd.IsSet("VIEW=Power") Then 
			cmd.RunCommand "Select PREV MAKEVISIBLE=immediate"
			DOpus.Output "Up / Details mode"
			cmd.RunCommand "Select PREV=row"
			DOpus.Output "Up / Icon mode"
		End if
		DOpus.Output "Up / Tree"
	End If
End Function

Also, if I have 2 lines of thumbnails, select the 3rd thumbnail in 1st line and use command Select PREV=row. 1st thumbnail in 1st line is selected instead of thumbnail in 2nd line. Same thing with Select NEXT=row. :confused: Maybe command can be improved.

I just found this script in my configuration and I just saw that I did not get an answer on my problem.
With the above script (last post), assigned to the up arrow, when the focus is in the tree, the focus is detected but there is no change of folder.
Is there a tip or workaround?

That script doesn't even try to do anything if the tree has focus.

I don't think there is a built-in command for moving the selection in the tree up and down, but you could use this or something similar:

Or just use the Home and End keys to go to the top and bottom of the file display, which is a lot easier.