Author Topic: set focus to a folder  (Read 21148 times)

avantuser1114

  • Active Member
  • ***
  • Posts: 121
    • View Profile
set focus to a folder
« on: March 25, 2013, 08:13:26 »
is there a way to set focus to a folder using multiscript or custom commands?

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4409
    • View Profile
    • Multi Commander
Re: set focus to a folder
« Reply #1 on: March 25, 2013, 08:20:31 »
Code: [Select]
MC.Explorer.Goto PATH=F:\Folder\MyFile.exe
What will change path to F:\Folder and item focus to MyFile.exe

avantuser1114

  • Active Member
  • ***
  • Posts: 121
    • View Profile
Re: set focus to a folder
« Reply #2 on: March 25, 2013, 09:06:17 »
It seems that this only works for files..If I want to set focus to a folder 'Myfolder' for example and set the PATH to F:\Folder\Myfolder then Myfolder will be opened..what I want using the previous example is open 'Folder' and set focus to 'Myfolder'...

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4409
    • View Profile
    • Multi Commander
Re: set focus to a folder
« Reply #3 on: March 25, 2013, 09:15:48 »
That will never work. because how does it know if it should show F:\Folder or F:\FolderMyFolder.
Might be possible to add a extra parameter where the focus item is specified.

avantuser1114

  • Active Member
  • ***
  • Posts: 121
    • View Profile
Re: set focus to a folder
« Reply #4 on: March 25, 2013, 09:22:18 »
maybe something like  SetSourceFocusPath() function in the multiscript will do the trick..it will automatically set the focus to the final item in the path...of course I know it doesn't exist but maybe considered for the next version....

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4409
    • View Profile
    • Multi Commander
Re: set focus to a folder
« Reply #5 on: March 25, 2013, 09:55:20 »
Not sure about a MultiScript function since they are kind of disconnected from the UI.

avantuser1114

  • Active Member
  • ***
  • Posts: 121
    • View Profile
Re: set focus to a folder
« Reply #6 on: March 25, 2013, 10:15:26 »
Actually I need this because I made user defined commands(multi scripts) for going up (going to parent) and going down (opening a folder)..and assigned left arrow key for going up and right arrow key for going down since I want to navigate using keyboard. I extended the functionalities of each so that when going up or going down the sizes of the subfolders of the destination folder will be automatically calculated..what I did is upon opening the destination folder..I used 'Select All' command then used 'Calculate folder size' then 'Unselect All'..both work quite fine but the problem is I set the 'Remember selected files/folders when changing path' but because of 'Select All' and 'Unselect All' commands, the focus goes to the top when I go back to previous folder..there's no problem with 'going up', the problem is in 'going down'..maybe it would be better to see the scripts so I may post them in 'Scripts'

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4409
    • View Profile
    • Multi Commander
Re: set focus to a folder
« Reply #7 on: March 25, 2013, 10:28:39 »
If you used commander styled setup you would not need to do select/unselect, since by default no files/folders are selected and then all folders will be scanned when called. :)

However.

Instead of requesting a command to set focus,  a command like "MC.Explorer.SizeFolders ALL" would probably fit better.. ?



avantuser1114

  • Active Member
  • ***
  • Posts: 121
    • View Profile
Re: set focus to a folder
« Reply #8 on: March 25, 2013, 10:32:53 »
thanks for the tip!

'MC.Explorer.SizeFolders ALL' is a very welcome addition....!Can't wait!

Clarification: What you mean by 'MC.Explorer.SizeFolders ALL' is the sizes of all the subfolders of a directory will be calculated regardless of     selection. That is, even if there is only one folder selected, upon invoking this command the sizes of the folder selected and all other folders in the same directory will be calculated.Is that how it is?
« Last Edit: March 26, 2013, 07:32:01 by avantuser1114 »

avantuser1114

  • Active Member
  • ***
  • Posts: 121
    • View Profile
Re: set focus to a folder
« Reply #9 on: March 26, 2013, 08:32:54 »
It seems that calculation of folder sizes starts from top..when I tried calculating the folder sizes of my Drive (C) and sorted the folders in descending order so that Windows folder, the largest and takes longer time to calculate its size, is at the top, the other smaller folders didn't have their sizes displayed except after Windows folder size was displayed..if the calculation for all the sizes is parallel, then their sizes should have been   displayed ahead of Windows folder...

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4409
    • View Profile
    • Multi Commander
Re: set focus to a folder
« Reply #10 on: March 26, 2013, 09:55:47 »
Doing folder sizing parallel is not a good idea. I would make the harddrive work like a crazy frog on drugs. And doing so on the system drive the whole machine can hang for a bit. (since Windows access to pagefile will be blocked because of all the disk activity)
(Unless if you have a SSD. )

avantuser1114

  • Active Member
  • ***
  • Posts: 121
    • View Profile
Re: set focus to a folder
« Reply #11 on: March 26, 2013, 10:09:50 »
How about you limit the number of parallel processes to 2 or 3 or maybe a little higher so that they won't have very negative effect but at the same time improve the speed of calculation...

btw, how about my clarification about 'MC.Explorer.SizeFolders  ALL'...

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4409
    • View Profile
    • Multi Commander
Re: set focus to a folder
« Reply #12 on: March 26, 2013, 13:39:35 »
with ALL it is going to size all the folders at the current path.. so if you stand in C:\ all folder there will get sized.