Few problems when using Xyplorer

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Helix
Posts: 23
Joined: 28 Dec 2022 21:29
Location: To lock my topic is no solution!

Re: Few problems when using Xyplorer

Post by Helix »

Hi,

I think even with using the script language its not doable like I told in example before. Main goal is it to have a quick "get & set" function and this is just feasible with a simple user menu like buttons in this case. It must get handled quickly for the user. Maybe I try to explain it one more time. I made a little image what could explain it better what I mean and the idea I have so just have a look first....
SBPos_2023-01-21_210847.png
SBPos_2023-01-21_210847.png (48.19 KiB) Viewed 861 times
Leftside Filemanager Panel only. Now on the image I made you can see a new bar at the lower bottom which belongs to the left side panel only. The green & blue icons are little slot buttons the user can click on it (left mouse) to set the slot with the actually "view folders & scroll position". Now the button does change the color to green what mean the slot is already set. Another left mouse click on green button does execute the saved status = bring the view the user saved in front. A right mouse click on green button = free the slot. Just only a example / idea etc you know. So now the user can use this new position save & jump bar to set own positions just for the left main filemanager panel to jump very quick on any desired position / folder state without to change the right active panel. So this is a great idea I think (not only because it's comming from me). :) Just imagine this....you have made a tab on the right side which points / has open one folder path and in this folder you have a bunch of files you wanna move into different folder/s anywhere else from right tab panel into left panel. In this case you have to scroll each time manually the right scroll position to bring your folder xy in visible state / front so that you can move the file/s into. For next files you wanna move you have again to change the scroll position/folder state and again and again and so on. This is of course pretty bad right. Only thing you can do at the moment is using the miniTree function to set folders in view. Anyway, so I think to have that new function bar would be really nice or what do you think guys? Good idea or not?

Norn
Posts: 416
Joined: 24 Oct 2021 16:10

Re: Few problems when using Xyplorer

Post by Norn »

Like Ctrl+B to set favorite/unset favorite, but including view state?
It seems that only tabset() can save the tab view state, but it will save all tabs. . . You can click on another tab to save the current tab view state.
Win10, Win11 @100% 2560x1440 22H2

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Few problems when using Xyplorer

Post by highend »

A thing like that is already possible (with buttons in the main toolbar of course^^)...

Create your 20 icons (10 active + 10 inactive states)
Required tweak: CTBNoRClickDefaultCommands=1

Custom toolbar button.
Left click script:

Code: Select all

    perm $P_ITEM_1;
    if ($P_ITEM_1 == "") {
        focus "T";
        $P_ITEM_1 = <focitem>;
    } else {
        showintree $P_ITEM_1;
        goto $P_ITEM_1;
    }
    if (ctbicon() != "1_active.ico") {
        ctbicon("1_active.ico");
    }
Right click script:

Code: Select all

    perm $P_ITEM_1;
    if ($P_ITEM_1 != "") {
        $P_ITEM_1 = "";
    }
    if (ctbicon() != "1_inactive.ico") {
        ctbicon("1_inactive.ico");
    }
And then duplicate those scripts for each button and just use the next incremented value (for $P_ITEM_ and the belonging icon name)
One of my scripts helped you out? Please donate via Paypal

Helix
Posts: 23
Joined: 28 Dec 2022 21:29
Location: To lock my topic is no solution!

Re: Few problems when using Xyplorer

Post by Helix »

Similar like set favs just only for the left file panel scroll position state & entire folder states (Expand) and without to set a active folder. So with a function like that (as I did post already) we can scroll on the left panel around (free-style) and when the user does hit a free marker button then this entire state get saved (yes, pretty same like tabsets). So I don't wanna use many tabsets (whats not the goal in this case) if I want to use the left file panel as target area with different locations I just want to bring in front only. Is it too custom?

@highend

Thank you for trying to help with my request / question. So I tried what you told me just creating one custom button from symbol list. Now I gave the button your left & right click script and I also picked 1 icons for active & inactiive state with right names like in your script. So it works to set & call & unset the buttons with specfic active folder but the question was how make this without to change the active folder status?

Example: Just open any folder like "C:\Windows\System32". Now the active tab of the right side does open / show this path = Ok so far. Now I set my marker with my new button via left mouse press and then I scroll around anywhere and open here and there folder etc and then I wanna get back and I press my button again and it jumps back to "C:\Windows\System32" path and does set it in active mode = tab on rigth side gets changed too = Not what I want. I wanna jump back but without to change the active path. Just restore the scroll position state & expand folder status simialr like in a JSON file if you want. I made a new 5 step image so that you can see what I mean....
SBN_2023-01-22_225414.png
SBN_2023-01-22_225414.png (201.65 KiB) Viewed 802 times
...do you know what I mean now? Its almost this what your script does already but I just need it without to set the saved tree position into active mode (don't select it just show it) or just setting the focus only (LVIS_FOCUSED / LVM_ENSUREVISIBLE etc). Not sure what it can be set on this command in your script "focus "T". Just setting focus & visible.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Few problems when using Xyplorer

Post by highend »

Just remove the goto $P_ITEM_1;
One of my scripts helped you out? Please donate via Paypal

Helix
Posts: 23
Joined: 28 Dec 2022 21:29
Location: To lock my topic is no solution!

Re: Few problems when using Xyplorer

Post by Helix »

Ah ok thanks. Now it works. :) Is it also possible to set the focus line around the folder with any script command? You know, at the outside edge. Also wanna ask whether I could also use some relative paths for the icons (Appfolder)? At the moment I need to set the entire path into script parts itself. Is it possible to set & use paths of app folders itself like the icon folder? Like this..

Code: Select all

\Data\1_active.ico
\Data\1_inactive.ico
or
\Data\Icons\1_active.ico
\Data\Icons\1_inactive.ico
...in the portable version?

Another question about calling the HomeFolder. I see there is a option for every tab to set this and using alt+Pos1 keys to call it. Is it doable to make this function happen when I just double-click on the tab itself?

Double-Click on Tab = Bring active folder path in front (view) on left panel if HomeFolder is not set.
Double-Click on Tab = Call set HomeFolder in front in Tab & left panel.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Few problems when using Xyplorer

Post by highend »

Afaik no focus without switching to it.

You could use colorfilters though...

Left:

Code: Select all

    perm $P_ITEM_1;
    if ($P_ITEM_1 == "") {
        focus "T";
        $P_ITEM_1 = <focitem>;
        AddToColorfilter($P_ITEM_1, "FFFFFF,70B926");
    } else {
        showintree $P_ITEM_1;
    }
    if (ctbicon() != "1_active.ico") {
        ctbicon("1_active.ico");
    }

function AddToColorfilter($path, $color) {
    step; // DEBUG
    $oldFilter = colorfilter();
    $newFilter = "";
    if ($oldFilter) { $newFilter = RemoveFromColorfilter($path) }
    if ($newFilter) { $newFilter .= " || " . "T:dir:$path>$color"; }
    else            { $newFilter  = "T:dir:$path>$color"; }
    if ($oldFilter != $newFilter) { colorfilter($newFilter); }
}

function RemoveFromColorfilter($path) {
    step; // DEBUG
    $filter  = colorfilter();
    $esc     = regexreplace($path, "([\\^$.+()\[{])", "\$1");
    $pattern = "([ ]{1,}\|\|[ ]{1,})?T:dir:$esc>[A-F0-9]{6},[A-F0-9]{6}";
    $match   = regexmatches($filter, $pattern);
    if ($match) { $filter = regexreplace($filter, $pattern); }

    return $filter;
}
Right:

Code: Select all

    perm $P_ITEM_1;
    step; // DEBUG
    if ($P_ITEM_1 != "") {
        $oldFilter = colorfilter();
        $newFilter = RemoveFromColorfilter2($P_ITEM_1);
        $P_ITEM_1  = "";
        if ($oldFilter != $newFilter) { colorfilter($newFilter); }
    }
    if (ctbicon() != "1_inactive.ico") {
        ctbicon("1_inactive.ico");
    }


function RemoveFromColorfilter2($path) {
    step; // DEBUG
    $filter  = colorfilter();
    $esc     = regexreplace($path, "([\\^$.+()\[{])", "\$1");
    $pattern = "([ ]{1,}\|\|[ ]{1,})?T:dir:$esc>[A-F0-9]{6},[A-F0-9]{6}";
    $match   = regexmatches($filter, $pattern);
    if ($match) { $filter = regexreplace($filter, $pattern); }

    return $filter;
}
Relative paths?
ctbicon() already points by default to <xydata>\Icons

You can create any relative path you want by using XY's internal variables as the root: <xydata>\..\Shinier icons

Homefolder:
Look into the custom event actions category of settings and use a script to trigger that function: #348;
One of my scripts helped you out? Please donate via Paypal

Helix
Posts: 23
Joined: 28 Dec 2022 21:29
Location: To lock my topic is no solution!

Re: Few problems when using Xyplorer

Post by Helix »

Hello highend,

thanks for the new script. Yes, this is much better to mark the folder with any color. :) The script works good now but there is just one issue with folder names and mark them into color. In some cases I get marked all folder in green color if they having similar names like values. Just look...
Marker_2023-01-23_201910.png
Marker_2023-01-23_201910.png (19.88 KiB) Viewed 741 times
...all same folder names what matches in other folder names get marked too. So could you adjust the script to prevent that and just marking one folder only?

About the paths, so today I did download the latest version and removed my absolute paths from script/s and now it works just using the icon names & icons in Icons folder. Not sure why it wasn't working with the 23.90.0400 version.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Few problems when using Xyplorer

Post by highend »

Path is now in double quotes...

Left:

Code: Select all

    $color = "FFFFFF,E9AF00"; // White text on orange background
    $icon  = "1_active.ico";  // Relative or full path

    perm $P_ITEM_1;
    if ($P_ITEM_1 == "") {
        focus "T";
        $P_ITEM_1 = <focitem>;
        AddToColorfilter($P_ITEM_1, $color);
    } else {
        showintree $P_ITEM_1;
    }
    ctbicon($icon);


function AddToColorfilter($path, $color) {
    $oldFilter = colorfilter();
    $newFilter = "";
    if ($oldFilter) { $newFilter  = RemoveFromColorfilter($path) }
    if ($newFilter) { $newFilter .= " || " . "T:dir:" . quote($path) . ">$color"; }
    else            { $newFilter  = "T:dir:" . quote($path) . ">$color"; }
    if ($oldFilter != $newFilter) { colorfilter($newFilter); }
}


function RemoveFromColorfilter($path) {
    $filter  = colorfilter();
    $esc     = regexreplace($path, "([\\^$.+()\[{])", "\$1");
    $pattern = "([ ]{1,}\|\|[ ]{1,})?T:dir:[""]$esc[""]>[A-F0-9]{6},[A-F0-9]{6}";
    $match   = regexmatches($filter, $pattern);
    if ($match) { $filter = regexreplace($filter, $pattern); }

    return $filter;
}
Right:

Code: Select all

    $icon = "1_inactive.ico";  // Relative or full path

    perm $P_ITEM_1;
    if ($P_ITEM_1 != "") {
        $oldFilter = colorfilter();
        $newFilter = RemoveFromColorfilter($P_ITEM_1);
        $P_ITEM_1  = "";
        if ($oldFilter != $newFilter) { colorfilter($newFilter); }
    }
    ctbicon($icon);


function RemoveFromColorfilter($path) {
    $filter  = colorfilter();
    $esc     = regexreplace($path, "([\\^$.+()\[{])", "\$1");
    $pattern = "([ ]{1,}\|\|[ ]{1,})?T:dir:[""]$esc[""]>[A-F0-9]{6},[A-F0-9]{6}";
    $match   = regexmatches($filter, $pattern);
    if ($match) { $filter = regexreplace($filter, $pattern); }

    return $filter;
}
One of my scripts helped you out? Please donate via Paypal

Helix
Posts: 23
Joined: 28 Dec 2022 21:29
Location: To lock my topic is no solution!

Re: Few problems when using Xyplorer

Post by Helix »

Thank you for the script update highend. Works good now. Sehr gut! :D

Just a small AddOn question. Is it also possible to save the marked state and re-set it on restart by XYplorer itself? Just only a question no must have you know.

One more question about the tweaks I have to set manually in config file like this...

Code: Select all

; Tweak: no Click, Edit, Customize Toolbar commands in the CTB context menu
CTBNoRClickDefaultCommands=0 <-- to 1
...so if I change this in XYplorer.ini file then the right click via mouse on my custom buttons does work straight without getting a popup menu to see. Ok so far, but how can I call this change Window to enter some script datas etc? Is it also possible to call it without to see the menu = re-set CTBNoRClickDefaultCommands back 0? Just would like to know that whether I have to edit the ini file each time to get this custom button window to see etc.

Oh and by the way, so I don't wanna bother you / dev guys etc but I would like to ask again about that "drag & drop to outside" & left-mouse select + scroll problems. Is it possible to handle those 2 problem via script too? Otherwise a source code change to fix those 2 problems would be very welcome specially that drag & drop to outside is really so bad. I'am using XYplorer with maximized window (entire screen) and now just try to drag any selected file into a outside app. Its just working over the taskbar (moving file down over app icon till app popups and drop the file into) and thats just a NO-GO. I'am sorry to say that but this is just fact and really must get fixed because its total bugging me. Just try it by yourself and you should come to the same result. If you want to say that XYplorer is the best filemanager app then you really need to fix that. I hope you don't mind my complaint about that. Thank you.

EDIT: One more time about the latest script you made highend. So I see that the color status of the folder I have marked get saved and after re-start the folder is still colored = Good. Only problem I have now is that the right click function does do nothing to un-mark the marked folder. The icon does change to in-active state but the folder keeps marked. See image...
SBN3_2023-01-22_225414.png
SBN3_2023-01-22_225414.png (10.64 KiB) Viewed 716 times
...so problem should be the empty variables in the script after re-start or?

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Few problems when using Xyplorer

Post by highend »

Set: Configuration | General | Refresh, Icons, History | Scripting | [x] Remember permanent variables
or use writepv; to save them directly from the scripts

Ctrl+right click the toolbar buttons to get the popup menu after using the tweak

You can't fix drag&drop things via scripting
One of my scripts helped you out? Please donate via Paypal

Helix
Posts: 23
Joined: 28 Dec 2022 21:29
Location: To lock my topic is no solution!

Re: Few problems when using Xyplorer

Post by Helix »

Hello highend,

Thank you for that infos and now its working better again. I created some in & active buttons and using them now as quick jumpers. :)
JMP_2023-01-24_133629.png
JMP_2023-01-24_133629.png (21.82 KiB) Viewed 644 times
Ah ok, so I thought that already (drag problem) that its not doable with scripting. So I would like to know whether anyone else does see it as problem too or am I the only one? Just asking you know.

Helix
Posts: 23
Joined: 28 Dec 2022 21:29
Location: To lock my topic is no solution!

Re: Few problems when using Xyplorer

Post by Helix »

Hi guys,

just need to talk about the drag & drop problem (missing feature) in XYplorer app. As I told before it's really bugging that we can't do this. I made a small example video (1:22) where you can see what I mean. First I'll show you the normal Windows Explorer way and after this the XYplorer way...
Drag_and_Drop_Problem.gif
Drag_and_Drop_Problem.gif (2.86 MiB) Viewed 600 times
...so you see it's a problem right. In XYplorer I always have to go the long way over the taskbar below to bring the other app (Notepad in this case) back into front view so that I can move the mouse into the new app area and drop there. Seems you have write a own system hook routine to monitor the messages and prevent that Windows does bring XYplorer in front when WM_LBUTTONDOWN, WM_RBUTTONDOWN & WM_MBUTTONDOWN was triggered. Just see that in the normal messages like WM_LBUTTONDOWN in my own apps the windows area was set in front already and then it stops at this message. Not tried using SetWindowsHookEx function to check whether its possible with id hook WH_MOUSE to get triggered before. Anyway, you guys are the coding pro's and should check this out and find a way to fix this drag & drop problem. Just wonder why you guys didn't manage this already in the past. The XYplorer has so many functions the user can do almost anything (also did not find out everything yet) and then you just didn't care about that drag & drop issue yet? That makes me really wonder you know. :eh: Anyway, just my opinion but maybe other do see it same like me and I just can hope that you guys will ("please") fix that problem (I press all thumbs I have). Thank you.

Helix
Posts: 23
Joined: 28 Dec 2022 21:29
Location: To lock my topic is no solution!

Re: Few problems when using Xyplorer

Post by Helix »

Hey again guys,

how is going? Did you think about that drag & drop problem (limitation) in XYplorer and how to handle / fix it to make it work correctly like in Windows Explorer? In the gif animation you can see the problem very good and don't tell me it's not a problem. It is really a problem and I don't like the detour to drag a file over the taskbar. So now I would like to know whether you dev guys will care about that problem or not? If not then it would be a bad decision I wouldn't recommend. Just put it on your to-do list.

Problem 1 = Main problem: Drag & Drop file/s to outside windows just over taskbar possible!
Problem 2: Using default video renderer not working for all users/gpu drivers | Add EVR as alternative the user can set!
Problem 3: Selecting files with left mouse down + mouse wheel does de-select entire selection / it stops selection operation!

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

Re: Few problems when using Xyplorer

Post by admin »

I said "it would be nice to have". That's a code for "no immediate plans to actually do it". :) (And it makes no sense to ask again and again.)

Post Reply