Loop scroll with arrow keys

Ok. Not a big deal.
Thanks for your answer.

Leo,
You was write to say it's not make sense for other display mode than details or power one.
I have tried:
@ifset:VIEW=details Go FROMSEL or @ifset VIEW=details Go FROMSEL
and
@ifset:VIEW=details go up back
with no success.
Do you know what I'm doing wrong ?
Is it possible to combine more than one condition such as VIEW=(details, power) ?

Thanks !

@ifset should be on a separate line to the command(s) that come after it. See the examples in the manual.

What are you actually trying to do? It doesn't look like loop scrolling.

Sorry I have mixed two posts and reply to the wrong post, should be this one:
Open and go back with arrow key

Ok this is working:

@ifset:VIEW=Details
Go FROMSEL

Do I have to copy that for each mode or is there a shortcut?

@ifset:VIEW=Details
Go FROMSEL
@ifset:VIEW=Power
Go FROMSEL

The problem is that arrow keys do not work then in thumbnail mode.
What can I add after:

@ifset:else

to recover the normal behavior of arrows (go up, down, left and right) ?

The commands above should work?

But surely it's easier to get used to using Enter/Backspace than to try to change Left/Right arrow keys (which are right next to those keys) to do something in some modes and something else in others, and get used to doing a different thing in different modes?

That's like Dopus, once you have tried... :wink:
Seriously, navigate with only arrows keys to go inside and outside folders is very quick and intuitive!

This is what could be my perfect behavior...

Now I have define:

For left key

@ifset:VIEW=Details
go up back
@ifset:VIEW=Power
go up back
@ifset:else
Select PREV MAKEVISIBLE=immediate

For right key

@ifset:VIEW=Details
Go FROMSEL
@ifset:VIEW=Power
Go FROMSEL
@ifset:else
Select NEXT MAKEVISIBLE=immediate

It's ok for this two ones.

For up key

@ifset:VIEW=Details
Select PREV MAKEVISIBLE=immediate

For down key

@ifset:VIEW=Details
Select NEXT MAKEVISIBLE=immediate

It's not ok in thumbnail view : can't go up and down in the grid...
So close :grinning:

PS: as you can see, secure screeshots do not blur file display border when define as a static header.

I don't think there are commands to move up/down a row in Thumbnails (etc.) mode, but we might be able to add some.

I've added it to our list.

Thanks Leo.

In the next update you'll be able to use Select NEXT=row to go down a row and Select PREV=row to go up a row.

1 Like

In reference to an earlier question in this thread (testing which control has focus); currently, you can do this in a limited way:

@if:set focus=left
// left file display has focus
@if:set focus=tree
// tree has focus

You have to test for specific left/right windows though, there's no way to just see if the file display has focus. In the next update we'll improve this as well, so you'll be able to do:

@if:set focus=filedisplay
// file display has focus

Many thanks to you, I will test that !
:smiley:

I try to implement navigation by arrows like @gilleschapron.

So for exemple I have this command for Up key.

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

Problem, I want normal behavior (up in tree) when focus is on tree so I try to use @if:set focus=filedisplay but multi condition seems to fail.

Questions:

  • Is there a way to test focus by script (If left file display is active, do this… If tree is activate, do this…) ?
  • Is there a way to test view mode by script (details, thumbnails…) ?

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 - #12 by Leo

Hi,

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
@if:else
Select PREV=row

But not if I affect this one to right key:

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

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

@if:set VIEW=Details
Go FROMSEL
@if:else
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
Go FROMSEL
@if:set VIEW=Power
Go FROMSEL
@if:else
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)
	DOpus.ClearOutput
	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"
		Else
			cmd.RunCommand "Select PREV=row"
			DOpus.Output "Up / Icon mode"
		End if
	Else
		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.