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 ... 4 5 6 7 [8] 9 10 11 12 ... 21
176
Script / Re: Rename profiles accessed by MS?
« on: December 28, 2016, 10:15:51 »
Sorry to ruin your Xmas break Mathias!  :o

Originally I wanted to call an existing rename profile (in the same way as a filter) with a MScript.  Couldn't see how to do that.  Filters have an ID to call but I have not found ID tags in the rename dialog & didn't dig deeper. 

Not all files contain all the same items I want to change.  Some have one character to change, others some or all.
I wasn't sure I could apply a single @var to this task.  I expected conflicts.
I concluded that with multiple possible case-sensitive rename actions, I needed to queue them discretely, so gave them different @vars.   
Would a Function concatenate multiple changes...?

As you know I like to cause headaches with MultiScript - I find it therapeutic.   8) :)

177
Beta Releases / Re: Multi Commander 6.5 BETA
« on: December 27, 2016, 18:36:57 »
Strange filter behavior

(Using b2303 w7x64)
I set up an advanced filter for folders >1mb made within the last 2 days, (In the file matching tab I have only the default entry of *).  See pic.
If folders have been size calculated the filter works but when I click 'show all' or enter *.* manually, I get nothing displayed in the pane.   ???
Using F5 or the 'refresh' icon does nothing.  I can only re-display the items in the pane by navigating away & then back.
Broken?

178
Script / Re: Rename profiles accessed by MS?
« on: December 25, 2016, 11:08:19 »
Thought I'd share my 'solution'.  I expect the MS wizards will know a better/optimal way, but this works for me on one or multiple files to clean up/replace  unwanted chars in filenames. ;)

Code: [Select]
//Name cleanup

@var $arr1 = GetSourceSelectedPaths();
@var $items = arrayCount($arr1);
@var $CurrentNameFullPath;
@var $OrgName;
@var $NewName0;
@var $NewName1;
@var $NewName2;
@var $NewName3;
@var $NewName4;
@var $NewName5;
@var $n1;

for( $n1 = 0; $n1 < $items; $n1++ )
{
  $CurrentNameFullPath = $arr1[ $n1 ];
  $OrgName = PathGetNamePart( $CurrentNameFullPath );
  $NewName0 = StrReplace( $OrgName, "_ " , "-" );
  $NewName1 = StrReplace( $NewName0, " m" , " e " );
  $NewName2 = StrReplace( $NewName1, " r" , "R" );
  $NewName3 = StrReplace( $NewName2, " y" , " " );
  $NewName4 = StrReplace( $NewName3, " x" , "m" );
  $NewName5 = StrReplace( $NewName4, "a" , " s" );
 
  RenameFile( $CurrentNameFullPath, $NewName5, "SILENT" );
}


179
Script / Rename profiles accessed by MS?
« on: December 24, 2016, 16:27:43 »
I see that it is possible to use filters in MS now & maybe dreamed this also applied to rename profiles..?
So far I cannot find anything related to MS calling rename filters though.
Perhaps it is a 'to do'?
If not please point me in the right direction! ;)

Meanwhile I will have to do it the old way,   ;D

Merry Xmas

180
Beta Releases / Re: Multi Commander 6.5 BETA
« on: December 20, 2016, 16:45:59 »
The scripts are run in the same thread so the UI. so the control is not returned back to the UI until the script have finished.

Running the script in the background is possible. But it is not officially supported since you really need to understand threads and the issues with them and race condition.
For example If the script you have above was run in the background.  what would happen if you during the execution of the script moved focus to another tab or location ?
The GetTargetPath() would all of a sudden would to start to return a different path.

Ahaa.  That makes sense. Thanks for the info Mathias :)

181
Beta Releases / Re: Multi Commander 6.5 BETA
« on: December 19, 2016, 16:04:38 »
Thanks for the reply Mathias.

I only needed to Unhceck "Refresh tabs when application focus is returned to MC"  to match your suggestions. 
So far it has not randomly jumped again today. 
It started jumping about in folders containing mixed files & folders after I posted, the example I gave originally was files only in a nested folder.
This reminded me of something that had happened a few builds back that had been fixed.

This may be unrelated to the build but this is very noticeable also (it came & went a few builds back if you recall) - why would a script slow down folder navigation (hold focus) & can I do anything about it?
eg I have a script to rename & move a file.----

If I simply move the file I can immediately navigate away from the folder whilst the process occurs. 
Today I noticed that I must now wait until the copy/move op is completely finished before I can navigate away up the tree.

Is it the mix of MC custom command & script perhaps?
This is my button script:-

Code: [Select]
Log( 1, 10, "Renaming files to %%parent_folder_name%%[_N].*" );

@var $src_path = GetSourcePath();
@var $arr = PathGetParts( $src_path );
@var $name = $arr[0];
@var $prefix = StrReplace( PathGetPathPart( $src_path, 1 ), $name, "" );

@var $n = StrRFind( $prefix, "\\" );

if ( $n > 0 )
{
  $prefix = StrSub( $prefix, $n + 1, StrLen( $prefix ) - $n - 1 );

  @var $i;
  @var $s;
  @var $file;
  @var $files;

  $arr = GetSourceSelectedPaths();

  for ( $i = 0; $i < arrayCount( $arr ); $i++ )
  {
    $file = $arr[$i];
    $s = PathGetFileExtPart( $file );
    $name = $prefix + "*" + $s;

    $files = FindFiles( $src_path + $name );
    $n = arrayCount( $files );

    if ( $n == 0 )
    {
      $s = "";
    }
    else
    {
      if ( $n == 1 )
      {
        $s = $files[0]; 
        RenameFile( $s, StrReplace( $name, "*", "_0" ), "RENAME_RO" );
      }

      $s = "_" + numtostr( $n );
    }           

    RenameFile( $file, StrReplace( $name, "*", $s ), "RENAME_RO" );
  }
}
else
{
  Log( 1, 10, "It seems parent folder is root. Renaming impossible." );
}

// move

@var $arr1 = GetSourceSelectedPaths();
@var $items1 = arrayCount($arr1);
@var $MoveNameFullPath;
@var $targetPath;
@var $sourceFile;
@var $n1 = 0;

for( $n1 = 0; $n1 < $items1; $n1++ )
{
  $MoveNameFullPath = $arr1[ $n1 ];
  $targetPath = GetTargetPath();
  $sourceFile = $MoveNameFullPath;
 
  MoveFile( $targetPath, $sourceFile, "NODIALOG");
 
}

182
Beta Releases / Re: Multi Commander 6.5 BETA
« on: December 18, 2016, 15:02:08 »
Just updated to b2301 & my weird selection thing  (http://forum.multicommander.com/forum/index.php/topic,1877.0.html) has returned. :(

There is one other odd thing that seems to be happening - when clicking back - MC normally goes to the last selected file/folder, now it might decide to go up a level to the root above instead. 
Think this has happened 5 times out of 10 today from the same folder with <200 files to one above with >100 folders - not very clear as to why.  It is the same folder that is generating my selection problem though.  ???


183
Beta Releases / Re: Multi Commander 6.5 BETA
« on: December 12, 2016, 13:36:20 »
Thanks Mathias.  I will try defining an advanced filter.
I have a MS mouse & although I do not use the feature it has 'gesture' capability & I wondered if it somehow was being called when MC is active for some reason.  So I am going to mess with drivers for a bit ;)

Im not sure how the gesture thing works.. I don't think so..

Realized that I should probably have posted these msgs in the other thread :(

I spent some time with the MS drivers & with this latest 2299 build & different intellipoint drivers the problem has gone away.  Hopefully it is *fixed* now!
I can now get back to causing trouble with the MC scripting  :D

184
Beta Releases / Re: Multi Commander 6.5 BETA
« on: December 10, 2016, 11:40:40 »
Thanks Mathias.  I will try defining an advanced filter.
I have a MS mouse & although I do not use the feature it has 'gesture' capability & I wondered if it somehow was being called when MC is active for some reason.  So I am going to mess with drivers for a bit ;)

185
Beta Releases / Re: Multi Commander 6.5 BETA
« on: December 09, 2016, 23:08:03 »
Seems my random selection issue is back since installing b2294 re:-
http://forum.multicommander.com/forum/index.php/topic,1877.msg7080.html#msg7080
--tripped me up a quite few times today.  :-\ 
Seems to follow the mouse some of the time.  I.e. if I sweep the mouse up & select, the selection will be rising in a block to the clicked item, & mouse moving down & clicking selects randomly above clicked item.  This is without using <shift> or <ctrl>.
Not always the case though as I had the selection of every file above the clicked item a few times.  I cannot pin down a pattern, but it happens...  ???  maybe I need to delete the mouse driver & see what happens.

I wondered ref. the quick filter box (bottom right of pane), is there is a way to enter "-" as I can only use it as an exclude modifier?
I can always run a rename first & after but had sto ask ;)

Thanks for the update Mathias :)

186
Script / Re: Extract text & save to file?
« on: November 29, 2016, 16:00:07 »
So far I have been using the GUI with the search & filter functions & using <ctrl+p> to get my paths when needed; I can use MDV to review the files themselves.

Thanks for the advice Mathias  8)
FindFiles will give me an array of files I can then run a regex on. 
I should be able to pass that result to the SaveStringToFile function.  That certainly has to be at least as quick as what I'm doing via the GUI. 
The trick will be to move it along a few steps to get the 'finished product'.  I will experiment & see if I can produce something that completes some of the steps more quickly than I can do it via the GUI.  Then I can start to look at the other aspects.

Quite a few possibilities are present but require a bit more code than powershell by the look of it :)


For those who want this kind of functionality *now!* I've found a nice freeware util that does it & more  -
http://prgrep.com/?lng=en  PRGrep

187
Script / Re: Extract text & save to file?
« on: November 28, 2016, 12:36:58 »
OK Thanks Mathias.
I will have to look at how to break up the operation - maybe that would be the best way to get the 'features' I want.
A few smaller scripts that I can run to get certain results could work.

In any case, I cannot live without <ctrl+p> now!  :D

I did find something which appears to do the job I want but is more complex/heavy than I need- it is an interesting bit of coding tho
https://www.binarymark.com/products/batchregex

Maybe I should try Powershell
This would appear to be the right basis for what I want
Code: [Select]
Param (
[Parameter(Mandatory=$true)]
   [string] $FullyQualifiedPath
)

#Note: Make sure the following path is outside those being searched!
$OutputFile = "G:\Test\Results\BegEndResults.txt"  #Adjust as needed

$Pat1 = [regex] '(Begin)*(End)'  #Adjust tags between () as appropriate

Remove-Item "$OutputFile"

Get-ChildItem -Path "$FullyQualifiedPath" |

Get-Content  | Select-String -Pattern $Pat1 -AllMatches >> "$OutputFile"

188
Script / Extract text & save to file?
« on: November 27, 2016, 17:24:52 »
I wondered if I could make a script to search for files containing a string & output the found lines to a text file or clipboard.

I can see that the search & filter functions will find the file content but is it possible to grab the found lines & output them?

SaveStringToFile could be used to output the result but defining the str + parameters & deciding what to output is potentially a bit more complex. 
If I wanted to find any line that included a word or phrase, & output that whole line, can I do it or should I be looking at more complex tools?
e.g.
I want any line with 'cat'
I have a file with this content
Code: [Select]
the frog sat on the mat
the cat sat on the mat
the dog sat on the mat
the fox sat on the mat
the result output should be :- the cat sat on the mat
I assume I can use LF or CRLF to define lines or punctuation such as a full-stop to flag 'whole' lines.

I also like these options:-
  • save string(s) as list
  • save string list including filename (or name & path)
  • save string(s) from multiple files as list
  • Output list to clipboard
Hope that makes sense.
This may be too much for a MC script, but I'd like to play around with writing it if it is possible  :D

189
Beta Releases / Re: Multi Commander 6.5 BETA
« on: November 27, 2016, 17:05:11 »
TabSessions will be useful.  Quite a lot for me to play with.  ;D
 Thanks Mathias ;)

190
Beta Releases / Re: Multi Commander 6.5 BETA - other
« on: November 19, 2016, 11:39:24 »
Selection bug - I guess this would have started around 6.4.6 or .7, I know in .8 it had improved a lot & in this build it has happened only twice (with daily use).
When it first started I thought it might have been the mouse / overlay as it sometimes would appear to select from the mouse cursor position on screen.  But as it only occurs in MC when items are being block selected & moved I thought it may be something related to these  changes: -

Release v6.4.6 (Build 2246) ( 16-Aug-2016 )
FIXED - Start with a ExplorerPanel showing the root of REG: now works again
FIXED - Items sometimes got selected when activating application.
FIXED - Focus was sometimes lost if focus was changed during filesystem scan
FIXED - Crash that could happen if item was removed after filesystem scan, But before UI had refreshed.
FIXED - 1 stability issue

As I said it is very random but is now not occurring several times per day. :-\

Thanks for looking into it  ;)


191
Beta Releases / Re: Multi Commander 6.5 BETA - other
« on: November 16, 2016, 13:25:41 »
Thanks Mathias.  Sorry for posting in wrong place. As I am always using the latest build I lose track of which issues belong to normal or beta & just try to report them when I get opportunity  :-[ ;)

It appears all my 'hangs' whilst processing copy/move instructions went away.
Win7 just did a bunch of updates incl. some dotNET package stuff - maybe MS was the real culprit!  [As if that was ever not the case   ;D ;D]

192
Beta Releases / Multi Commander 6.5 BETA - other
« on: November 14, 2016, 13:16:31 »
Thanks for the reply Mathias.  I am using b2282 - that is the most recent isn't it?

The selection bug-this is difficult to explain, it had occurred a while back and then in a recent release what I believed it to be was listed in the list of fixes & the problem 99% went away. I now cannot find the update list which included this fixed description.   :-\

Basically if you selected one or more files within a group and then moved/copied them to the opposite pane, selecting another block of files would often start from a random point in the collection of files.  This happened between dirs on the same physical disk+partition. (Maybe this is related to the delay in the 'grab focus thing?  All my disks say 100% okay & the FATs etc pass windows checkdisk tho...)

The focus of the last highlighted file would somehow randomly move so that a select+shift could start in a random location and a random selection of files would be highlighted for the next operation.  I suspected that the mouse cursor + overlay was involved. Difficult to explain it without videoing it.  It did occur once yesterday on a directory with a hundred files present.
E.g.
I select 10 files from a folder holding 100 files, I move these 10 files to the opposite pane;
I have highlighted another file as the copying operation occurs, I press shift and select the last file hi-lighting a new block;
the highlight grabs a random block which ends with my end selection click.
So the hi-lite selection grabs extra/different files

Code: [Select]
1
2-hi-lite
3-hi-lite
4-click
5-shift
6-shift
7-shift
8-shift
9-shift
10-shift+click - hi-lite
11
12
13
14
15
16
This could be really crazy sometimes adding dozens of extra files to the next operation.  Sometimes the selection would extend into off-screen area that could only be seen by using the scroll bar.  It wasn't really frequent & I couldn't decide how to describe it ....  then you seemed to fix it.
But maybe you meant something different & my PC is just trying to make my head explode... ::)

Grab focus-normally whilst the copy or move operation occurs I can select something else and begin or queue another operation from another dir.  Moving out of the current dir, whilst the initial op commences, now delays.
I must wait and MC will enter a 'not responding' state if I click 'up' to move up the tree, whilst it begins the copy or move operation.
I had wondered if this was due to the USB drives that I copied some items to but these are USB 3.0 drives on the USB 3.0 socket & it also happens between SATA hard disks within the system.
So I mean it is grabbing focus as it starts a function and this is preventing me from clicking on/doing anything else.

I have been resetting column width and then setting as default. But I maybe hadn't clicked save as default since installing the last beta ...I thought I had! 
I have now it seems to be okay!

OK on the Find switch/functionalities, I can wait  & use regex etc so it's not life-threatening (yet!)




193
Beta Releases / Re: Multi Commander 6.5 BETA
« on: November 13, 2016, 11:25:23 »
Using multi-commander 6.5 build 2282 x64 (w7 x64), I have noticed a couple of things that seem worth mentioning:-

I've noticed that the column settings often change widths within my open/saved tab selections & I need to use the restore columns right-click function after a system restart or MC restart.

The strange selection bug is very rare now but will still occasionally manifest if I have a folder of more than 400 files and complete some operations like move delete copy rename etc between selections.

I find the move copy function seems to grab focus more than previously.
E.g. if I set a file to copy to a USB stick I could previously click to return back up the hierarchy of folders and initiate further move/copy operations which then would be queued from different folders.
If I try that now I find MC will to some extent 'hang', & although it will always recovers it takes time to make the transition between folders & to queuing further commands.
Previously MC would change dirs & queue as fast as i clicked through them. (I am using a no dialog command in a button for the move/copy ops.  Don't know if that may be relevant.)

I notice on the Find dialogue that the old setting for search within results is no longer present. I'm guessing that it can in most instances be replaced with a Regex, but is there any likelihood that that switch will be returning?

I haven't looked too closely at the script/internal commands relating to the new Find Filters yet. :-[   But  I wondered if I could assign a MC command or script a button to use a find preset & then use that as a selection to be assigned to a following operation.
E.g.  Find <filter selection preset> & move selection to opposite pane.

Thanks your continued efforts on this Mathias - always lots of great things in MC!   8)

194
Beta Releases / Re: Multi Commander 6.4.x Issues
« on: August 06, 2016, 15:07:53 »
MC do not hook it self into Explorer or any parts of Windows so I don't think this is the fault of MC.

Have you installed/reinstall some ShellExtension ? that are a common cause to crashes. Because then you got 3d party code hooking it self into Explorer..
and even into MC.

MC is the only *known* install/software change within the last fortnight.  I didn't think it would be MC but just double checking.
I am quite strict with the AV/FW on what is allowed, & stuff silent installing 'should' be sandboxed automatically.  Nothing is 100% of course.
Win has settled down today - so I have to go back to M$ - the usual suspect.   ::)

195
Beta Releases / Re: Multi Commander 6.4.x Issues
« on: August 05, 2016, 14:43:04 »
2233 continues to behave....but
I've seen this twice today - coincidence?  winsock vs updater?

Code: [Select]
Problem signature:
  Problem Event Name: APPCRASH
  Application Name: Explorer.EXE
  Application Version: 6.1.7601.19135
  Application Timestamp: 56a1bbe2
  Fault Module Name: mswsock.dll
  Fault Module Version: 6.1.7601.23451
  Fault Module Timestamp: 573365e8
  Exception Code: c0000005
  Exception Offset: 00000000000013a3
  OS Version: 6.1.7601.2.1.0.256.1
  Locale ID: 2057
  Additional Information 1: 19ac
  Additional Information 2: 19ac82dd26a7c5093f1a1740ce191211
  Additional Information 3: ec76
  Additional Information 4: ec76ed24576236f57830e708bf4e8e69

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\windows\system32\en-US\erofflps.txt

196
Beta Releases / Re: Multi Commander 6.4.x Issues
« on: August 05, 2016, 14:37:51 »
Quote
My focus is where it is supposed to be.

Wasn't "focus" one of your problems with the previous release, too  ;D  ;D

If you didn't delete so many folders, Mathias would not have to work so hard on his vacation ;D

Exactly!   :P

197
Beta Releases / Re: Multi Commander 6.4.x Issues
« on: August 04, 2016, 18:24:51 »
OK I'm trying to do too many things at once (f3 is search...)  I meant multi-rename - which is in the same dropdown menu so I confused everyone!  :-[

I am now trying it with 2233b & it is all good so far.  My focus is where it is supposed to be.

198
Beta Releases / Re: Multi Commander 6.4.x Issues
« on: August 04, 2016, 18:10:31 »
OK thanks for the details & explanation Mathias.  8)

I was referring to the rename dialog - eg via f3 (which I have assigned to a button)
Inline rename stays in focus.


Grabbing the 2233beta now - 4-7kb - dialup dayz are back :)
Maybe time to mirror to something like 1drive or ggl drive?  Not sure on security/usage implications tho.

PS I can see how the changes on the filesystem + scanning can cause a domino effect.  Good times! :D

199
Beta Releases / Multi Commander 6.4.x Issues
« on: August 04, 2016, 13:44:42 »
Just grabbed 6.4.3 b2232 (w7 x64)
I find that if I delete a folder the hi-lite bar jumps to the top of the window ".."rather than the old behaviour of going to the next item shown.  Bit annoying to be scrolling around when you have more than 50 folders :P

I noticed the d/l was very slow - serverside issue?  Or just overloaded?  Took 3 tries over about 40 minutes to eventually get the file.  Took more than 10mins to actually transfer.  Unusual!  .....Sorry, but I was desperate to see the latest build!!   ;)

Thanks Mathias.

****
I've found something else that is possibly related.
On selecting a file & opening rename the focus hi-lite can also jump to ".." sometimes.
This causes the rename dialog to open without any files being present in it.   ???

200
Beta Releases / Re: Multi Commander 6.4 BETA/RC
« on: July 26, 2016, 11:58:41 »
Thanks for the reply Mathias
Having rebooted the PC it now seems less likely to 'spring' to a new size when accessing sub-folders etc.
I was also able to drag the columns back to the way I'd had them previously without them springing to a different width when I released the mouse-button.
I saved the layout as default & it is behaving now.
Guess Windoze wanted to mess me around!

Pages: 1 ... 4 5 6 7 [8] 9 10 11 12 ... 21