Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - espkk

Pages: [1] 2
1
Beta Releases / Re: v10.3 - BETA (Updated 30-Jan)
« on: February 02, 2021, 16:09:41 »
Hello Mathias,
I've just updated from 9.7 to 10.3 and got an empty toolbar here (not sure if this is related to this BETA).
Do you have an idea what caused that? Can I completely remove it like before?
I'm not able to reproduce that. Can be some missmatch with configuration since the toolbar is rewritten. Try to enable it and then disable it again
Just reproduced that on a clean 10.3 MC disabling the following:
Core settings->Standard Commands
Explorer panel settings->Layout->File commands
Explorer panel settings->Layout->Drive buttons

In previous versions that bar was hidden if the above options are disabled, now there is an empty bar.
Is this possible to bring back the old behaviour? I enjoyed my minimalist hotkey-oriented setup  :)

Try disable them in the menu->view->toolbar instead
Cool, that works! Thank you

PS this is not so important but I also just noticed another visual bug (screenshot attached)
Maybe DPI related; I'm on 3840x2160/250% (thinkpad T580)

2
Beta Releases / Re: v10.3 - BETA (Updated 30-Jan)
« on: February 02, 2021, 15:20:15 »
Hello Mathias,
I've just updated from 9.7 to 10.3 and got an empty toolbar here (not sure if this is related to this BETA).
Do you have an idea what caused that? Can I completely remove it like before?
I'm not able to reproduce that. Can be some missmatch with configuration since the toolbar is rewritten. Try to enable it and then disable it again
Just reproduced that on a clean 10.3 MC disabling the following:
Core settings->Standard Commands
Explorer panel settings->Layout->File commands
Explorer panel settings->Layout->Drive buttons

In previous versions that bar was hidden if the above options are disabled, now there is an empty bar.
Is this possible to bring back the old behaviour? I enjoyed my minimalist hotkey-oriented setup  :)

3
Beta Releases / Re: v10.3 - BETA (Updated 30-Jan)
« on: February 01, 2021, 14:40:14 »
Hello Mathias,
I've just updated from 9.7 to 10.3 and got an empty toolbar here (not sure if this is related to this BETA).
Do you have an idea what caused that? Can I completely remove it like before?

4
Support and Feedback / Re: Prevent folder from locking
« on: January 16, 2018, 19:13:43 »
Thanks for the answer, but I didn't mean copying or any other filesystem operations. I mean when a folder's subfolder is opened in MC, it prevents from deleting that parent folder. Windows Explorer allows you to do that: if an opened folder or it's subfolder was deleted, Explorer will just 'cd' to first existing parent folder in the path, no access error occurs.

UPD:
Yeah, that's probably also kind of "files in use", but probably there is a simple workaround?

5
Support and Feedback / Prevent folder from locking
« on: January 12, 2018, 16:56:36 »
Hi! How to prevent a folder from access(move/delete) locking while opened in MC?

6
Beta Releases / Re: Multi Commander v7.6 BETA
« on: November 22, 2017, 22:56:30 »
Right... just checked in previous versions, there is the same thing
The problem appears when the menu bar is hidden in settings: if you open any menu and hover on its caption and then close the bar by pressing ALT or refreshing views.

7
Beta Releases / Re: Multi Commander v7.6 BETA
« on: November 22, 2017, 20:27:04 »
"Extensions" and "Tools" menus stay highlighted even unfocused  :o
Never noticed that before

8
Beta Releases / Re: New Already Exists Dialog
« on: November 22, 2017, 19:06:42 »
Renaming the new file is more consistent I guess... But renaming the existing file may be also useful in some cases
It's a good idea to implement both options unless they won't complicate the interface

P.S. sorry for reminding here, but can you check PM, please

9
Beta Releases / Re: New Already Exists Dialog
« on: November 22, 2017, 10:15:57 »
Or "keep both" might also mean that it should be copied and rename it.. so that you get both files there
That's what I meant. It's useful when you want to archive/backup files(here default backup command doesnt't quite fit), but don't care about renaming matching files to "filename_(1)" for example.

10
Beta Releases / Re: New Already Exists Dialog
« on: November 21, 2017, 18:02:58 »
Highlighting the timestamp of the newest file would be useful. Same for the highest size
Also, it could have "Keep both" option -- copy/move with incremental autorename

11
Feature Requests and Suggestions / Re: Editable path in each panel
« on: November 20, 2017, 14:08:01 »
Please make the path for each panel editable so that:
- it can be quickly added to e.g. I:\abc to I:\abc\def\xyz
- it can be easily copied (ctrl-C) for use in other applications
- it can be overwritten by pasting (ctrl-V) from other applications
1. cd def\xyz
2. alt-shift-p
3. did you try ctrl+v?

12
Support and Feedback / Re: Active Side every Time 75:25
« on: November 05, 2017, 17:07:36 »
If you mean split size, check Core Settings->Layout->Application layout->Panel Tab->Remember split size between restarts

13
Hello there
I'm using a large number of portable programs for a long time(including Multi Commander).
Some of them are console, the others are GUI, but most of them accept arguments.
Sometimes it's very handy to use MC tools for shortcuts/buttons/file type setup, but in most cases this is not enough for me, therefore, I decided to make a tiny tool which finds and executes specified filename(or even the beginning of the filename). First version was written in Batch script, it had worked pretty slow and I've rewritten it to C(the code is below).

This tool (let's call it just "run") supports executing .bat, .cmd, .exe, .vbs and any other extension located in PATHEXT global variable
It tries to find specified file recursively, starting with root to itself folder. This is especially useful with portable devices where all paths should be relative. That's how portable programs approximately organized in my PC:
Code: [Select]
X:\data\exec\!run.exe    <--- Our tool. I called it "!run" because I have another program called "run"
X:\data\exec\script1.vbs <---vbs script
X:\data\exec\script2.bat <---batch script
X:\data\exec\mc\MultiCommander.exe
X:\data\exec\firefox\firefox.exe
X:\data\exec\sysinternals\procmon\procmon.exe
And so on

To execute any of them with any arguments, I only need to "!run <filename> [args]"
For example:
"!run upx -9 target.exe" - run upx\upx.exe with arguments "-9 target.exe"
or
"!run proc" - run sysinternals\procmon\procmon.exe
or
"!run multi" - run mc\multicommander.exe

Using this tool with MC is very useful because you can easily copy filepaths and pass them as arguments. (Don't forget to wrap path arguments with spaces in quotation marks, otherwise your programs will parse them as different arguments)
Keep in mind that MC command line is limited to visible borders, but I hope this will be changed in future.

Well, let's integrate our tool with Multi Commander:
1. Add new script
Code: [Select]
function GetArgs()
{
  @var $args = "";
  @var $n;
  @var $a;
  for( $n = 1; $n < $argcount; $n = $n + 1 )
  {
       $a = $arg($n);
       $args += ' "' + $a + '"';
  }
  return $args;
}

@var $cmd = GetTagValue("${mcinstallpath}") + "\\..\\!run.exe"; //change this line to your !run.exe path if needed!!!
@var $cmdargs = StrTrimLeft($arg(0), ":") + GetArgs();

if( StrFind($arg(0), ":", 0) == 0 )
  MC.Run CMD="{$cmd}" ARG="{$cmdargs}" ADMIN
else
  MC.Run CMD="{$cmd}" ARG="{$cmdargs}"
Note that script also allow you to run our tool with Admin rights by prefixing filename with ':'

2. Make alias for that script. Personally, I use just "r"

3. Use it!
Same examples using MC:
r firef - run X:\data\exec\firefox\firefox.exe
r upx -9 "C:\Program Files\Test\Test.exe" - run X:\data\exec\upx\upx.exe with arguments "-9 "C:\Program Files\Test\Test.exe""
r :procm - run X:\data\exec\sysinternals\procmon\procmon.exe with admin rights

Note that you can use it the same way everywhere - just locate !run.exe in program files for example, and modify path to !run.exe in MC scripts(or make additional script)

I hope it will be helpful for someone   ;)
And sorry for my bad English

Source code for "run" tool (compiles with any VS version):
Code: [Select]
#include <stdint.h>
#include <string.h>
#include <Windows.h>
#include <Shlwapi.h>
#pragma comment(lib, "Shlwapi")

LPWSTR lpCmd;
LPWSTR *szArgList;

#define UNC_PREFIX L"\\\\?\\"
#define MAX_PATH_UNC (INT16_MAX-sizeof(UNC_PREFIX))

int ExecuteFile(const LPWSTR szPath)
{
WCHAR szCurPathUNC[INT16_MAX];
wcscpy(szCurPathUNC, UNC_PREFIX);
LPWSTR szCurPath = szCurPathUNC+4;

if (szPath)
{
if (wcscpy_s(szCurPath, MAX_PATH_UNC, szPath))
return FALSE;
}
else
{
GetModuleFileNameW(GetModuleHandle(NULL), szCurPath, MAX_PATH_UNC);
*wcsrchr(szCurPath, L'\\') = L'\0';
}
PathAddBackslashW(szCurPath);

size_t nLen = wcslen(szCurPath);
if (wcscat_s(szCurPath, MAX_PATH_UNC, szArgList[1]) ||
wcscat_s(szCurPath, MAX_PATH_UNC, L"*"))
return FALSE;

WIN32_FIND_DATAW ffd;
HANDLE hFind = FindFirstFileW(szCurPathUNC, &ffd);
szCurPath[nLen] = '\0';

if (hFind != INVALID_HANDLE_VALUE)
{
do
{
if (!(ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
LPWSTR pExt = PathFindExtensionW(ffd.cFileName);

static WCHAR szPathExt[1024];
if (!szPathExt[0])
GetEnvironmentVariableW(L"PATHEXT", szPathExt, sizeof(szPathExt));

PWCHAR buf, pPathExt = wcstok(szPathExt, L";", &buf);
while (pPathExt != NULL)
{
if (_wcsicmp(pExt, pPathExt) == 0)
{
if (wcscat_s(szCurPath, MAX_PATH_UNC, ffd.cFileName))
return FALSE;

PWCHAR pArgs = wcschr(lpCmd, L' ');
if (pArgs != NULL)
pArgs++;

ShellExecuteW(NULL, NULL, szCurPath, pArgs, NULL, SW_SHOW);
return TRUE;
}

pPathExt = wcstok(NULL, L";", &buf);
}
}
} while (FindNextFileW(hFind, &ffd) != 0);
}

if (wcscat_s(szCurPath, MAX_PATH_UNC, L"*"))
return FALSE;


hFind = FindFirstFileW(szCurPathUNC, &ffd);
if (hFind != INVALID_HANDLE_VALUE)
{
do
{
if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
if (wcscmp(ffd.cFileName, L".") != 0 && wcscmp(ffd.cFileName, L"..") != 0)
{
szCurPath[nLen] = '\0';
if (wcscat_s(szCurPath, MAX_PATH_UNC, ffd.cFileName))
return FALSE;

if (ExecuteFile(szCurPath))
return TRUE;
}
}
} while (FindNextFileW(hFind, &ffd) != 0);
}

return FALSE;
}

int WINAPI wWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPWSTR lpCmdLine,
int nCmdShow)
{
int nArgCount;
szArgList = CommandLineToArgvW(GetCommandLineW(), &nArgCount);
lpCmd = lpCmdLine;

if (nArgCount == 1)
{
MessageBoxW(NULL, L"Usage: run <(beginning of)filename> [args]", L"Error", MB_ICONHAND);
return EXIT_FAILURE;
}

if(!ExecuteFile(NULL))
{
MessageBoxW(NULL, L"File not found", L"Error", MB_ICONASTERISK);
return EXIT_FAILURE;
}

return EXIT_SUCCESS;
}

14
Feature Requests and Suggestions / Re: SFX archives support
« on: June 29, 2017, 20:29:15 »
Thanks, but I've meant can I open normal archive(not SFX) file as folder(thro' FS plugin) from script and from C++ API?

15
Feature Requests and Suggestions / Re: SFX archives support
« on: June 29, 2017, 19:02:53 »
I thought lib decompresses buffer, not the entire file... Ok, then it's probably not a good idea, especially if you don't have the time for it
BTW, stock 7z console(which is also opensource) supports such files:
Quote
7-Zip [64] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04

Scanning the drive for archives:
1 file, 1685398 bytes (1646 KiB)

Listing archive: t.7z

--
Path = t.7z
Warning: The archive is open with offset
Type = 7z
Offset = 162816
Physical Size = 1522582
Headers Size = 106
Method = LZMA2:1536k
Solid = -
Blocks = 1

P.S. Is there a way to call FS plugin manually? I mean to force them to read a file using scripts or API?

16
Feature Requests and Suggestions / Re: SFX archives support
« on: June 29, 2017, 18:30:28 »
Generally, SFX is a concatenation of a program to unpack it's overlay(what is right after PE in the same file) and the archive itself
So, the offset of an archive is always known from the outside. Many archivers open SFX like usual archives by skipping PE program. It's useful because you can use your archiver to unpack this file, but if you don't have proper one, you can just rename it to exe...

17
Feature Requests and Suggestions / Re: SFX archives support
« on: June 29, 2017, 18:12:47 »
I quite often see the files packed as SFX with 7z extension
This is because most of archivers read them, but if there is no suitable archiver, you can rename 7z to exe and unpack it as SFX
Also if the file is SFX with .exe extension, it would be handy to alt+f6 them, instead of running SFX(out of harm's way)

18
Feature Requests and Suggestions / Re: SFX archives support
« on: June 29, 2017, 18:02:55 »
I mean FS plugins can do this check if the file has appropriate archive ext
For example: FS-7zip can't open 7z file if it's SFX, but checking it for SFX is just a few lines of code(and ms of time)
Same with File>Unpack files...
So no need to check every .exe file

19
Feature Requests and Suggestions / SFX archives support
« on: June 28, 2017, 15:54:19 »
Hello, Mathias
Is it possible to make SFX archives support? 7zfm deals with such files. I guess this requires just to check file for MZ sig and if overlay exists, check it as normal archive

20
SDK / Re: SDK outdated
« on: August 26, 2016, 14:09:42 »
Okey, thank you, just was afraid you forgot it again :)

21
SDK / Re: SDK outdated
« on: August 26, 2016, 13:57:54 »
Hey, Mathias   ;)

22
SDK / SDK outdated
« on: August 21, 2016, 11:46:00 »
Any updates for SDK? getting
Quote
Extension "***" v1.0.0.0 is to old. It is built for Interface version 1.51.0.0. Extension is NOT loaded.

23
Script / Re: ${focusfilepath} tag
« on: April 18, 2016, 13:05:03 »
Ok, I misunderstood the meaning of func names, it works, thanks  :)

24
Script / Re: ${focusfilepath} tag
« on: April 18, 2016, 12:58:22 »
I read about this function, but it is only "Get the full path to the item in focus in the source view." AFAIU. What about target view?

25
Script / ${focusfilepath} tag
« on: April 18, 2016, 12:11:53 »
How to get value of "${focusfilepath}"?

In this code it always returns nothing
Code: [Select]
@var $cmdargs = "powershell dir " + GetTagValue("${focusfilepath}") + "-Recurse | Unblock-File";
MC.Run CMD="powershell" arg="{$cmdargs}"

Pages: [1] 2