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 - Ulfhednar

Pages: 1 ... 15 16 17 18 [19] 20 21 22
451
Feature Requests and Suggestions / Re: Todays wishlist
« on: August 24, 2013, 19:27:22 »
Yes sorry I should remember to call it the MultiRename dialog.  I use that or the F2 inline edit & F2 doesn't bring up a new dialog so I didn't differentiate.   :o
It is MultiRename in both of the above requests - recall & auto-update between passes.
Also -- In MultiRename I notice that a saved regex rename doesn't tick the <regex> box when it is loaded.  Perhaps you can add that to the save function?

I will just try to remember what I'm doing until you get to the Undo phase of development then!  ;D
I can see any undo is a major undertaking, I had imagined this would somehow hook into the logging that you employ in MC.  User selects a log entry & steps back from that - was my thought. 
Given the probable need to group related operations from the log, I guess it's still very complex.

Could a preview pane employ a 3rd party util to save work?  Something like a chunk of Irfanviews' source-code perhaps.  (Assuming the code is able to be shared etc.)


One more for the list -
Debugger - could the view field auto-scroll with the highlight bar?  At the moment it can disappear from view, requiring manual scrolling.  (Too lazy to step, scroll & think ???)


452
Script / Rename & move/copy
« on: August 22, 2013, 17:55:59 »
Having got my regex script to work I wondered about scripting a rename instruction followed by a copy/move instruction to be attached to a button.
This is an attempt to combine my existing code with a few more operations.
Basically I want to select a file; rename according to a pattern; copy/move that file to a new location.
So my script 'should'
a - get selected files/folders
b - run the renaming operation(s)
c - open the copy or move dialog (default transfer to opposite pane).  The destination should be editable as per the 'Find' dialog copy/move operation.  Option for silent copy/move could be useful too.

Is this possible?
I assume I can invoke the copy or move dialog after the renaming & take the updated selected file forward into the copy/move operation.

I can see some possible issues - forcing the selection to update & then taking the 'new' item into the new operation seems like it could be a problem.  Can the script check the item has  1 - updated & 2 - then 'auto' select the new product of the rename operation?


Sorry if this sounds dumb, I'm new to this type of coding & I need to practice something with loops etc to get a better understanding.... ::)

453
Beta Releases / Re: Possible bug
« on: August 22, 2013, 09:36:46 »
Managed to lock the cursor into the find field today - happened after/as I was resizing the columns.
The path field (a long one in this instance) springs back to its' original position when I'm dragging it trying to see the full path, then after a few drags the horizontal lock occurs.
MC 3.3 b1476 x64

454
Feature Requests and Suggestions / Todays wishlist
« on: August 21, 2013, 18:40:32 »
In case these aren't already on the todo list I had a couple of things I'd like to see in MC (& keep forgetting to ask about  ;D)

- recall last rename in the renaming dialog
- save state of find dialog ('open' showing all options or 'closed' with reduced options)
- universal preview pane for 'text' files & images
- Undo function  (Already requested)
- allow rename dialog to update selection allowing several changes without closing/reopening the rename dialog.


455
Beta Releases / Re: 1470 issues and questions
« on: August 21, 2013, 18:19:11 »
Well it had to happen  :)
Guess I overwrote one of the presets & forgot is all the expression juggling...  ::)

456
Beta Releases / Re: 1470 issues and questions
« on: August 21, 2013, 14:03:32 »
 ???  When I first started my script trials I added a script to the drop-down. (see pic)
Thought I'd used F1 to do that ... or has the regex experiment made me crazy?

457
Beta Releases / Re: 1470 issues and questions
« on: August 21, 2013, 00:05:40 »
I don't seem to be able to save scripts in the debugger anymore - New / F1 don't work / greyed-out (3.3 build 1470)

458
Script / Re: Search routine
« on: August 20, 2013, 23:18:39 »
Mathias - Thanks to your comment on C++ regex standards &
http://www.cplusplus.com/reference/regex/match_replace/

I was able to transpose my original regex into a compatible format, the $token & trial & error gave me my desired date mod
10_May_1876  ->  10.May-1876

That + your earlier help on the script writing gave me a handy button for renaming date named folders: -

Code: [Select]
@var $arr = GetSourceSelectedPaths();
@var $items = arrayCount($arr);
@var $CurrentNameFullPath;
@var $OrgName;
@var $re = "([0-9]+)_([a-zA-Z]+)_([0-9]+)";
@var $result;
@var $n = 0;

for( $n = 0; $n < $items; $n++ )
{
  $CurrentNameFullPath = $arr[ $n ];
  $OrgName = PathGetNamePart( $CurrentNameFullPath );
  $result = StrRegExpReplace($OrgName, $re, "$3.$2-$1");
 
  RenameFile( $CurrentNameFullPath, $result, "SILENT" );

}

Switching the match tokens around
Code: [Select]
$result = StrRegExpReplace($OrgName, $re, "$3.$2-$1");allowed
10_May_1876  ->  1876.May-10

Obviously this opens up a great deal of possibilities for the regex function in my script experiments.  (& anyone else who may need to use regexs....)


OT
FYI I don't seem to be able to save scripts in the debugger anymore - New / F1 don't work / greyed-out (3.3 build 1470)

459
Script / Re: Search routine
« on: August 19, 2013, 00:01:05 »
Thanks Mathias.
I got confused with $arr - when it was present the script completed one pass, but not the rest of the selection.  (As you must realize).
So I left $arr in order to get the operation to complete & thus find out which part of the regex would work. 

I started using perl type commands but as you say the StrRegExpReplace function won't allow me to do a 'batch' of separate ops.

Took me a while to see which string was the right one with which to replace $arr.  But I now have a better array usage!
 
This will make changes to multiple selections now (not what I want of course but better from a script point of view.) -

Code: [Select]
@var $arr = GetSourceSelectedPaths();
@var $items = arrayCount($arr);
@var $CurrentNameFullPath;
@var $OrgName;
@var $re = "\w.";
@var $result;
@var $n = 0;

for( $n = 0; $n < $items; $n++ )
{
  $CurrentNameFullPath = $arr[ $n ];
  $OrgName = PathGetNamePart( $CurrentNameFullPath );
  $result = StrRegExpReplace($OrgName, $re, " ");
 
  RenameFile( $CurrentNameFullPath, $result, "SILENT" );
 
  }

I cannot use ( ) within the $re define multiple segments, soI think I would have to do a loop of repeat operations to change each element individually.  Quite frustrating when I can run the regex's I posted in a text editor on text & get the right result.   

Regular Expression Editor (RegExpEditor), amongst others, on sourceforge could be useful for regex types.


Well I guess that is enough headache for one day.   ;)

+++

Update
Thought I'd add the regex I was using to change the date field I mentioned above for clarity.  (I was showing the whole string as regex transpositions instead of in -> out)
10_May_1989 -> 10 May 1989
find -
Code: [Select]
((?:[0-9]+)+)_((?:[a-zA-Z]+)+)_((?:[0-9]+)+)replace -
Code: [Select]
\1 \2-\3
I think I can see a way for each \#<match> for be given its' own instruction.  More headaches req'd.

The main advance for me here is the visualization of matrices in your script.  I was thinking more DOS Basic & linear commands.  Matrix application is more dynamic of course.  So thanks for forcing me down that road.   ;D

460
Script / Re: Search routine
« on: August 18, 2013, 17:33:10 »
Code: [Select]
@var $arr = GetSourceSelectedPaths();
@var $items = arrayCount($arr);
@var $CurrentNameFullPath;
@var $OrgName;
@var $re = "((?:[0-9]+)+)-((?:[0-9]+)+)-((?:[0-9]+)+)";
@var $result;
@var $n = 0;

for( $n = 0; $n < $items; $n++ )
{
  $CurrentNameFullPath = $arr[ $n ];
  $OrgName = PathGetNamePart( $CurrentNameFullPath );
  $result = StrRegExpReplace($OrgName, $re, ".");
 
  RenameFile( $arr, $result, "SILENT" );
 
  }

Seems better - no errors but not renaming.  Will keep trying.

Update
Code: [Select]
@var $arr = GetSourceSelectedPaths();
@var $items = arrayCount($arr);
@var $CurrentNameFullPath;
@var $OrgName;
@var $re = ".A[0-9][0-9]B[0-9][0-9].";
@var $result;
@var $n = 0;

for( $n = 0; $n < $items; $n++ )
{
  $CurrentNameFullPath = $arr[ $n ];
  $OrgName = PathGetNamePart( $CurrentNameFullPath );
  $result = StrRegExpReplace($OrgName, $re, ".");
 
  RenameFile( $arr, $result, "SILENT" );
 
  }

changes
Code: [Select]
"This.String.A02B22.SUBString-ZZZZ" ->  "This.String.SUBString-ZZZZ"...so the regex is definitely not MC friendly....  :'(
I will need to find out how this system handles the 'hungry' (greedy) operation ::)

As it is the regex I have used would match all combos of 1-12-123; 123-1-12; 1234-12-123 etc so it would be handy to transpose this into the MC-friendly form.

OT -
what do I do to access multiple selections?  At the moment this will only do the first of any selected group.  I'm guessing it's related to $n.

Update 2

Code: [Select]
@var $arr = GetSourceSelectedPaths();
@var $items = arrayCount($arr);
@var $CurrentNameFullPath;
@var $OrgName;
@var $re = "\d+";
@var $result;
@var $n = 0;

for( $n = 0; $n < $items; $n++ )
{
  $CurrentNameFullPath = $arr[ $n ];
  $OrgName = PathGetNamePart( $CurrentNameFullPath );
  $result = StrRegExpReplace($OrgName, $re, "x");
 
  RenameFile( $arr, $result, "SILENT" );
}

Will change multiple digits but won't retain the initial sequence
1.23.234
becomes x.x.x

I want to pass the original string back modifying only certain characters. 
As in  eg -
Code: [Select]
((?:[0-9]+)+)_((?:[a-zA-Z]+)+)_((?:[0-9]+)+) ->     ((?:[0-9]+)+) ((?:[a-zA-Z]+)+)-((?:[0-9]+)+)
10_May_1980 -> 10 May-1980

I suspect I'm not going to be able to do this.    :(

461
Script / Re: Search routine
« on: August 18, 2013, 16:47:26 »
I added a couple of screen shots above to help explain what is happening with mass rename & the regex's.
Debug error was row 13 then 14 when I used $Orgname

(I'm no expert I only know enough to cause trouble!) Hungry:- + forces regex engine to keep looking for matches so
Code: [Select]
((?:[0-9]+)+)should find any combination of digits.  Useful for dates etc where you may have 1-12-1980
Code: [Select]
((?:[0-9]+)+)-((?:[0-9]+)+)-((?:[0-9]+)+)should match that sequence.
In your example you predefined the # of digits with [0-9] [0-9], if it works with + you can (in theory!) match more than the 2 digits without defining multiple [0-9]s. 

If I use $Orgname I think I drop part of the sequence which links to $newname, maybe I need to have 2 {....} operations defined, one to run the regex, then the next to take the result & use it to rename.  ???

My bad  - I wasn't thinking replace regex with regex but how the groups would appear as a regex (trying out variations in mass rename & confusing myself!)

Thanks for your time Mathias.

462
Script / Re: Search routine
« on: August 18, 2013, 15:29:31 »
I have begun looking at the MC regex function.
I wonder if this is not an acceptable regex -
Code: [Select]
((?:[0-9]+)+)ie: -  find numbers, can be any number of numerals in a group.
Same for letters
Code: [Select]
((?:[a-zA-Z]+)+)
MC doesn't seem to accept this format. 
I see your example
Code: [Select]
<str> StrRegExpReplace(<str>, <regex>, <replaceWith>, [int startPos] )
example

@var $str = "This.String.A02B22.SUBString-ZZZZ";
@var $re = ".A[0-9][0-9]B[0-9][0-9]."";
@var $result = StrRegExpReplace($str, $re, "XX");
 // result is This.StringXXSUBString-ZZZZ

 - specifies quantity of individual characters.  'Hungry' expression is defined differently in MC?

For my experiment I had been thinking of changing a folder date format, e.g. :-
10-05-1989 -> 10.05.1989
Code: [Select]
((?:[0-9]+)+)-((?:[0-9]+)+)   ->    ((?:[0-9]+)+).((?:[0-9]+)+)or
10_May_1989 -> 10 May 1989
Code: [Select]
((?:[0-9]+)+)_((?:[a-zA-Z]+)+)_((?:[0-9]+)+) ->     ((?:[0-9]+)+) ((?:[a-zA-Z]+)+) ((?:[0-9]+)+)
   
I tried: -
Code: [Select]
@var $arr = GetSourceSelectedPaths();
@var $items = arrayCount($arr);
@var $CurrentNameFullPath;
@var $OrgName;
@var $NewName;
@var $re = "((?:[0-9]+)+)-((?:[0-9]+)+)-((?:[0-9]+)+)";
@var $str = $OrgName;
@var $n = 0;

for( $n = 0; $n < $items; $n++ )
{
  $CurrentNameFullPath = $arr[ $n ];
  $OrgName = PathGetNamePart( $CurrentNameFullPath );
  $NewName = StrRegExpReplace($str, $re, ".");
 
  RenameFile( $arr, $NewName, "SILENT" );
  }

But I get - Error : -23 => Parameter wrong type or in the mass rename - 'invalid characters' msg
I had the regex's working  outside MC - but they don't work in the mass rename or the script (yet)   :-[



463
Beta Releases / Re: Multi Commander v3.3 Alpha/Beta
« on: August 17, 2013, 23:38:47 »
In Build 1469 the file coloring rules can now be edited using the File Coloring Rules Editor.

There is still some features missing from it like import/export, enabling/disabling of individual rules and the use of alternative rules sets and support for Multi-Language and more

Also the old file coloring is now removed and the user configuration of the old file coloring is converted into the new Coloring Rules.

Also MultiRename search/replace part support regex and there is a new Multi-Script function that replaces using regex StrRegExpReplace
Code: [Select]
<str> StrRegExoReplace(<str>, <regex>, <replaceWith>, [int startPos] )
example

@var $str = "This.String.A02B22.SUBString-ZZZZ";
@var $re = ".A[0-9][0-9]B[0-9][0-9]."";
@var $result = StrRegExpReplace($str, $re, "XX");
 // result is This.StringXXSUBString-ZZZZ

Yaaaaaay for regex script function !!   ;D 
I will be trying this asap!

Like the look of the colouring dialog, I find the file type colours very helpful.

464
Beta Releases / Re: Possible bug
« on: August 17, 2013, 23:33:55 »
Thanks Mathias,  I was uncertain if this was intentional.
Given negative side-effects then it is understandable that it is left as is.
Really it is not a priority, but nice if you have opportunity to get it to work.

...mystery solved...  ;)
*

@ Iceman, I wasn't thinking you meant me to use TC just that I am unfamiliar with it because I didn't like it enough to learn its' idiosyncrasies.

465
Beta Releases / Re: Possible bug
« on: August 16, 2013, 10:22:22 »
Yes you are right Iceman it is a 'unique' Win Explorer behaviour.
Also exists in Dir Opus & IIRC XYplorer & xplorer2.  (Tried a few of these FMs & only like 2 - MC & DO.)

The reason I include drag as a qualifier is because I can think of no other reason for click & hold on a file in a sub-level window.  The act of holding/moving the item invokes the z position modifier.  Otherwise the window pops forward - Explorer included.

The problem for me is the need for Explorer to sometimes not change focus, exists with all file managers.  There are times when you want to drag to a top window without changing the Z order.

I was trying to ascertain if MC also had this Exploer-type behaviour.  If I click-hold-drag in Explorer it stays put, in MC it doesn't. 
Mouse button down = MC to front.

466
Beta Releases / Re: Possible bug
« on: August 15, 2013, 12:15:18 »
Ulfhednar :
I Think you are mixing up things and that is confusing Mathias

The issue is not drag and drop..  and that z-order is changed during drag..
it has nothing to do with drag at all.

It has to do with that MC is set to focus when mouse button down is received.
(When a new program is set to focus Windows will by itself bring that program to the front )
Explorer and some other apps set the program/window as focus when the mouse button is released (ButtonUp)

TC and a lot of other programs also have this issue.

I am not talking about click-select; drag-drop.  That does change the Z order (& 'always' has in Explorer etc).  If this focus change event isn't clear I can try to video it & post the result.
I can only go on what I read here, Mathias seems to say MC behaves differently for him.  If he said that it was no different then my question is moot/irrelevant. 
Quote
However when I drag here. Nothing changes focus for me while dragging. only why I can make a program pop to the top is to hover over the taskbar for that program during drag.

I don't use TC - tried it (several versions) & didn't like it.
I think if TC behaves in this way then the question of focus grabbing stands. i.e. there is something that allows or forces a certain range of stacking behaviours in relation to the type of cursor interaction. 



467
Beta Releases / Re: Possible bug
« on: August 14, 2013, 17:53:24 »
Well, I only obey when I have a gun to my head so it is a no choice kinda thing  ;D

You can have MC beneath other windows, click-hold-drag from MC without focus/stack change, but I cannot, as soon as I click MC will jump to the top. 
I cannot do this between 2 MC windows or MC & a 3rd party window.  MC with selected item will always jump forward.

Using Explorer the windows stay in the same order as they started. 
In the screen shot I can click-hold-drag the files in the pane below (*.chk) & I can drop it into the top pane without any effect on stacking.  The top window (on right in the pic) stays put on top.  Click-release will change the stacking order.

So the question is why?  It seems as if something linking the interaction of desktop (e.g. DWM.exe) & MC is sometimes awry.  With all the 0000000s of configs out there it might be tough to track down.  Is there anything I can run to monitor the environment?

468
Beta Releases / Re: Possible bug
« on: August 14, 2013, 12:20:43 »
I recall you mentioning this before Mathias, & I understand that you must 'obey' the OS as far as this level of interaction goes.
However if I open Explorer panes x2 & drag from the underlying pane, the focus/stacking does not change. (See attached)
I cannot replicate this behaviour with MC with click-hold-drag.
I thus imagined that some hook into the display management isn't quite right.
You have greater understanding of the calls MC makes & how Win responds but to me it appears anomalous.  :-\ ;)

I will dig about as regards the nav keys, I haven't edited anything to my knowledge but maybe something is still damaged from a bad install I had a while back.

469
Beta Releases / Re: Possible bug
« on: August 13, 2013, 19:24:55 »
Maybe this is related to the drag n drop focus grabbing I mentioned in another post?
Not sure. As i said i close all apps, launch MC and begin resizing. Just a few resize operations reqiuired to get cursor trapped.

I haven't been able to replicate that.  For me it is (maybe) some combo of resizing the columns in the search pane, & maybe <shift> or <ctrl> select. 
It's only done this a few times for me & it won't do it today!  ::)

470
Beta Releases / Re: Possible bug
« on: August 13, 2013, 09:35:28 »
The cursor lock-up has been rare for me [w7 x64 ult; NVDA 320.49 VGA driver.]. 
As I said I could move up & down the whole desktop but not past the MC pane divide.  Escaping the search region allowed me to hit minimize, which reset the behaviour.  Progs tiled behind seemed to be locked behind MC.  Moving, closing & minimizing the other programs was possible within the space.  They didn't come forward on screen however.
On 1457 this effect hasn't happened yet.

Maybe this is related to the drag n drop focus grabbing I mentioned in another post?  (Dragging a media file to VLC brings MC to the front/top & obscures the target window.)  In the past I've found click/hold/drag would keep the target on top & allow me to drag a file from the lower level window.  No change in stacking. 
Sorry if this is a red herring, trying to think of any other clues...




I have noticed something new today, I don't usually use <ctrl> & <pgup>, <pgdn>, <+> etc but I noticed today those key combos didn't work for navigation.  (Perhaps I need to turn something on in options?)

471
Script / Re: Search routine
« on: August 11, 2013, 18:34:17 »
 
It is planed to support regex in the search part in the search and replace section. But I have not had the time too add it.

Thanks for the update Mathias.  I will continue tearing my hair out with scripting trials while I wait.  :D

472
Script / Re: Search routine
« on: August 09, 2013, 18:33:40 »
OK thanks Mathias.
I will have to do more research.  ;)
I can envisage a multiple file/folder sequence with several routines employed - be nice to get it to work. :P

& OT (but still about regexs!)
Is the greyed out regex box in the mass rename dialog temporary?

473
Beta Releases / Re: Possible bug
« on: August 09, 2013, 18:29:05 »
As I have a generic bug post title I will add this here -

I sometimes find my cursor is locked inside the search result pane region. 
This means my cursor can go to the top/bottom of my monitor display but no further laterally than the dividing line between MC panes.

I cannot determine if there is any common cause as it is very infrequent.  I do more than one search a day & see it maybe once in 7-10 days.
(Today I had time to remember to report it!)
Only way I can get the mouse out of that space is to minimize the MC window.  Then everything returns to normal.

474
Beta Releases / Re: Possible bug
« on: August 08, 2013, 17:05:54 »
Sorry I was focused on your original announcement of the change in the in-line rename function.  :-[

475
Script / Re: Search routine
« on: August 08, 2013, 17:03:36 »
Quote
syntax coloring
OK no problem.  I can use my current workaround.  ;)

Quote
new function
OK, well I am currently hoping something like the following would work, but it doesn't seem to...

Code: [Select]
$NewName = StrReplace( $OrgName, "{((?:[0-9]+)+)\ }", "{((?:[0-9]+)+)\.}");
Is it just my lack of skill or StrReplace won't accept a regex at all?

Pages: 1 ... 15 16 17 18 [19] 20 21 22