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 2 3 [4] 5 6 7 8 ... 21
76
Support and Feedback / Re: MultiCommander v8.9 BETA
« on: July 25, 2019, 15:34:01 »
Still getting CTDs with that script so I decided to copy out the button script to a text-only editor & delete the button contents & save the new state with 'update'.
Copied the plain text back to the button, saved/updated & it's working again!
+ When copied from the text editor to the MSDebugger it also now works perfectly.  :D

Some weird invisible corruption able to crash MC & MSdebug I guess!  ::) :o

77
Support and Feedback / Re: MultiCommander v8.9 BETA
« on: July 16, 2019, 16:22:42 »
Using latest build 8.9 b2525 W10 x64 I'm still getting CTD if I run that script.
I tried with MSdebugger but no info is revealed.  ::)

78
Support and Feedback / Re: MultiCommander v8.9 BETA
« on: June 05, 2019, 12:57:10 »
pncdaspropagandas I can see that is what it should do, so I am wondering how it avoids doing it & selects a pdf instead.....  :-\ ::)

79
Support and Feedback / Re: Another thumbnail post ... sorry ...
« on: May 30, 2019, 14:25:04 »
Recent Win10 updates have broken some things in MC.
This might be one of those things.
I tend to stick to details view 90% of the time but IIRC I had a thumbnail issue a little while ago.
Using MC 8.9 b2520 beta x64, thumbnails work & this Win10 is fully updated.

80
Support and Feedback / Re: MultiCommander v8.9 BETA
« on: May 30, 2019, 14:22:09 »
I have had a few moments of scratching my head with the script so I too am glad to know I'm not alone pncdaspropagandas  ;)

I just tried your script on a dir with varied files - zip, rar, 7z + epub & pdf.
The debugger lists the last file - a .pdf - as soon as it reads the directory, lists it as being the array (see pic) & then ends on the next step.
Why does it jump to the .pdf instead of the actual archives...?   ???

On a dir with nothing but a single rar it ends with 0 instances found. (array size = 0)  :-\

So something is definitely weird.  ::)


81
Support and Feedback / Re: MultiCommander v8.9 BETA
« on: May 22, 2019, 14:32:56 »
Sorry Mathias.  Thanks for hiding it elsewhere ;) :D

This script/button has been used since c.2014 & has started misbehaving since beta 8.9.

The script crashes MC @
Code: [Select]
UnpackFile( $zip, $root, "*.*" , "OVERWRITEALL, USEEXISTINGQUEUE" );
For some reason I didn't run it in the debugger until now  ::)
I noticed that removing the last line
Code: [Select]
MC.RunCmd ID="ExplorerPanel.41075"makes no difference.

I'll have another look at it as I assume that you haven't had any other instances of this occurring.

82
Support and Feedback / Re: MultiCommander v8.9 BETA
« on: May 19, 2019, 13:39:52 »
MC v8.9 b2517 x64 on W10
Hope this is the right place for this...
I've had issues with crashing when running the internal zip command via a scripted button.
This always crashes MC (CTD) - I did send in the bug report incl the script used on a couple of earlier builds but it is still occurring.

Code: [Select]
// get & extract zips
@var $root = GetSourcePath();
@var $arrFiles = FindFiles( $root + "*.zip");
@var $count = arrayCount($arrFiles);
@var $zipFiles = "";
@var $zip;
@var $n1;


// Create ; separated list with all zip files to unpack
for( $n1 = 0; $n1 < $count ; $n1++ )
{
 $zip = $arrFiles[ $n1];
 $zipFiles += $zip;
 $zipFiles += ";";


UnpackFile( $zip, $root, "*.*" , "OVERWRITEALL, USEEXISTINGQUEUE" );
}
MC.RunCmd ID="ExplorerPanel.41075"

The internal zip/rar handling allows me to click through to the contents OK it's just when I call that script.
I am wondering if this is related to MScript as some other scripts that always worked before now sometimes seem to take a while to process.

83
Support and Feedback / Re: Losing Focus When Task Complete
« on: April 04, 2019, 11:34:03 »
OK thanks guys.
I had a sequence of different hardware, different driver builds & variable focus loss on 2 PCs with W10 so I wondered... Navigating away within MC seems to always defeat this loss tho.
Thanks for creating some code to handle this Mathias ;)

84
Support and Feedback / Re: Losing Focus When Task Complete
« on: April 01, 2019, 13:24:05 »
I've had the same problem since win10 1809.
When I have multiple windows open it will pull up the last viewed window, losing MC focus.
I do not need to navigate away during the MC operation, just to move around with MC & other windows running.
e.g. I use the browser then switch to MC, run an op, wait for MC to complete it's task & then browser will pop-up.
BUT If I navigate up/out from the source dir whilst op is running I do not lose focus

I am suspicious of the VGA driver involvement in this as it appears more frequent on some AMD driver versions than on NVDA.  I do not have enough different hardware to test this suspicion fully tho :(

85
Beta Releases / Re: MultiCommander v8.9 BETA
« on: March 11, 2019, 15:05:12 »
---

e05470df6fa74db19ad73aa2c34228ba ? that is a ID of your UserDefinedCommand ?
Then it depends on what that command was using.

Ah ok, I thought the ref # was the command called not the UDC ref #.  I'd previously had 'find files' selected in the dropdown & making a new UDC with that reselected restored that ref #. 
Will see what happens with the new build. ;)

86
Beta Releases / Re: MultiCommander v8.9 BETA
« on: March 08, 2019, 14:55:08 »
Thanks Mathias

I'd originally assigned e05470df6fa74db19ad73aa2c34228ba - that had been working...
I went thru the command selection process again & assigned e05470df6fa74db19ad73aa2c34228ba (again?!) & now it's working OK ::)  so that is just MC giving me a slap in the face I think :D

87
Beta Releases / Re: MultiCommander v8.9 BETA
« on: March 07, 2019, 14:59:02 »
So far so good for me - no CTDs etc.

Ref the search panel - I'd previously assigned it to a toolbar button - that is now broken, has the reference ### changed or...?
The RES# method seems more versatile but I'd like the window to open in the opposite pane as per old behavior or is that switchable via options?

I will keep digging just in case this is me not & MC  :P

Thanks for the continued MC dev work Mathias :)


88
Support and Feedback / Re: Hi all - Hi Matthias!
« on: March 07, 2019, 13:55:36 »
You can set up custom buttons & special define user commands
See
http://multicommander.com/docs/UDC_custom

I use eg -
MC.Explorer.Copy NODIALOG USEEXISTINGQUEUE

& have ones for move & delete

89
Support and Feedback / Re: Saving column layout bug
« on: February 21, 2019, 14:32:59 »
Just wondering if it might be AV related?  Do you see the xml timestamp change when you update it?

I've never had this layout error, but I have had the MDV refuse to keep altered settings without my manually editing the xml.

90
Support and Feedback / Re: On Windows shutdown, session is not saved
« on: February 21, 2019, 14:27:20 »
That is normal, MC doesn't save it's status on a timer or as a temp file etc.
You need to manually save sessions in file>tab sessions or use the last used session config which is saved when MC is normally closed & which auto-loads on MC restarting.

91
Support and Feedback / Re: Back and Forward
« on: December 02, 2018, 00:29:47 »
There are 'history' options.
The 2 dark blue arrow buttons on the left of lowest row of top buttons will navigate the history relative to each tab.
Hi-lite a tab & move about then click these back/forward arrows to retrace the moves, RMB or holding down LMB on an arrow will bring up the history to see/select the travel stops.  There is a full history button next to them (clock).
Parent is accessible via the 'normal' windows folder+green arrow in the top right of each tab, root is \.

Can't recall but you may need to define a custom command to make these things keyboard shortcuts....

92
On W10 I run MC as admin & have made sure it is fully whitelisted to prevent M$ or my AV from interfering with it.
I never see those warnings & everything works.

93
Feature Requests and Suggestions / Re: Skip All?
« on: July 15, 2018, 14:24:53 »
Thanks Mathias ;)

94
Feature Requests and Suggestions / Skip All?
« on: July 13, 2018, 14:53:25 »
Any chance of adding a Skip All button to this dialog?
I was copying/moving files from the Search pane to a folder, some files were duplicated & MC asked each time rather than giving the skip all or other options.

95
Script / Re: Title Case
« on: July 09, 2018, 22:07:04 »
I managed to plagiarize that piece  of code Mathias, I hadn't been sure how/where to insert it but I figured it out :P

Code: [Select]
@var $arr = GetSourceSelectedPaths();
@var $NameA = PathGetNamePart( $arr );
@var $newText = TitleCase($NameA);
@var $NameB = $newText[0] = StrToUpper( $newText[0] );

{
RenameFile( $arr, $newText, "RENAME_RO" );
}

Thanks again. ;)

BTW do you use any specific syntax coloring to help when when coding with MS?  I find it helps me if I can use colors when I'm trying something.  ATM I am using notepad++.  Any recommendations for coloring?   (It's probably a big job but maybe you can add syntax coloring to the MS Debugger some time....?)

96
Script / Re: Title Case
« on: July 08, 2018, 22:30:57 »
Thanks Mathias.  I appreciate the help. :)

My solution was more verbose.  My primary focus was to get a working version.  Now I can use this as a reference whilst I am playing about trying to tweak & tidy my code.
I had looked at the
Code: [Select]
$textPart[0] = StrToUpper( $textPart[0] );entry & was going to try it, but decided that I would probably create a conflict/problem.    ::)
So I went with what I knew would work with this task as a logical progression/last check on the first word case status. :P
I'd also wondered about adding a line equating to something like "ignore exceptions array if word starts with/at character 0" within your function.

I intend to come back to your function code as I need to understand how you have used scope & therefore how to use that $textPart[0] to check first word capitalization as the last operation before generating $NewText..

I think I understand about $n, that is interesting & raises more questions for me. I'm glad you have shown me that this can happen or I am sure I would have been driven crazy had I accidentally discovered it alone :)   

97
Script / Re: Title Case
« on: July 08, 2018, 14:59:16 »

Sorry,. I don't understand your reasoning how that should work, it make no logical sense :)
I know!  :D

Thanks to your input, I realized I hadn't assigned iterations & needed more references for the arrays & got it to work - I am still finding it hard to balance how smart code can appear with how dumb the machine really is  :P

Code: [Select]
@var $exceptionsArray[] = { "a", "as", "an", "and", "any", "at", "for", "from", "into", "is", "of", "on", "or", "the", "to", };
@var $n;
@var $oldN;

function TitleCase($name)
{
   return  _TitleCase($name, " ");
}

function _TitleCase($name , $splitchar)
{

  @var $result = "";
  @var $parts = StrSplit($name , $splitchar); // space and - will split string
 
  @var $cnt = arrayCount( $parts );
  for( $n = 0; $n < $cnt ; $n++ )
  {
    @var $textPart = $parts[ $n ];
    // To Lower
    $textPart = StrToLower( $textPart );
 
    if( StrFind( $textPart , "-", 0 ) > 0)
    {
      // Becuse of recursive bug, $n is is overwriten
      $oldN = $n;
      $textPart = _TitleCase($textPart , "-");
      $n = $oldN;
    }

    if( arrayFind( $exceptionsArray, $textPart ) == -1)
    {
    // Uppser case on first
    $textPart[0] = StrToUpper( $textPart[0] );
    }

    if( StrLen( $result ) > 0 )
$result += $splitchar;

    $result += $textPart;
  }
  return $result;
}
 

@var $arr1 = GetSourceSelectedPaths();
@var $items = arrayCount($arr1);
@var $CurrentNameFullPath;
@var $OrgName;
@var $NewName;
@var $n1;


for( $n1 = 0; $n1 < $items; $n1++ )
{
 
@var $arr = GetSourceSelectedPaths();
@var $NameA = PathGetNamePart( $arr[$n1] );
@var $newText = TitleCase($NameA);



  $CurrentNameFullPath = $arr1[ $n1 ];
  $OrgName = PathGetNamePart( $CurrentNameFullPath );
  $NewName = StrReplace( $OrgName, $NameA, $newText );
 
RenameFile( $CurrentNameFullPath, $NewName, "RENAME_RO" );
}

I obviously haven't made it as clean as it might be, but it is a start. 
Think I have abused the { } .  ::)

I am now wondering about capitalizing the first word where the first word is in the exceptions list e.g.
For MultiScript coding disasters this is the place
becomes
for Multiscript Coding Disasters This is the Place

I may need to plagiarize some of that function you created...  ;)

UPDATE
Added this
Code: [Select]
@var $char1 = StrSub($NewName, 0, 1);
@var $char2 = StrToUpper( $char1 );
@var $NameB = StrReplace( $NewName, $char1, $char2 );
 
RenameFile( $CurrentNameFullPath, $NameB, "RENAME_RO" );

so now the emergency is over, I can go to sleep :D :P



........I also wondered about the recursive bug $n/$oldN is that something that only manifests in this type of function?

98
Script / Re: Title Case
« on: July 07, 2018, 17:51:57 »
OK I'm incorrectly thinking that because
Code: [Select]
for( $n = 0; $n < $items; $n++ )works for multiple files - it will call the same thing ($arr) in 2 different ways --- which it won't  :o

I need to differentiate...  Thank you Mathias, I will try again & stop destroying your weekend now !   :D

99
Script / Re: Title Case
« on: July 07, 2018, 16:08:20 »
Thanks for the advice & info Mathias.
This is how I employed your function & it works well. I can see that it will be straightforward to expand on this for a number of other operations so I might actually learn how to use MS properly one day  :P ;)  It has (again) impressed on me that it is quite different from my school experience of Basic, this system feels like it contains a lot of macros in comparison.

Code: [Select]
@var $exceptionsArray[] = { "a", "an", "and", "any", "at", "for", "from", "into", "of", "on", "or", "the", "to", };

function TitleCase($name)
{
   return  _TitleCase($name, " ");
}

function _TitleCase($name , $splitchar)
{

  @var $result = "";
  @var $parts = StrSplit($name , $splitchar); // space and - will split string
 
  @var $cnt = arrayCount( $parts );
  for( $n = 0; $n < $cnt ; $n++ )
  {
    @var $textPart = $parts[ $n ];
    // To Lower
    $textPart = StrToLower( $textPart );
 
    if( StrFind( $textPart , "-", 0 ) > 0)
    {
      // Becuse of recursive bug, $n is is overwriten
      $oldN = $n;
      $textPart = _TitleCase($textPart , "-");
      $n = $oldN;
    }

    if( arrayFind( $exceptionsArray, $textPart ) == -1)
    {
    // Uppser case on first
    $textPart[0] = StrToUpper( $textPart[0] );
    }

    if( StrLen( $result ) > 0 )
$result += $splitchar;

    $result += $textPart;
  }
  return $result;
}

 
@var $arr = GetSourceSelectedPaths();
@var $items = arrayCount($arr);
@var $NameA = PathGetNamePart( $arr );
@var $newText = TitleCase($NameA);
@var $i = 0;


for( $i = 0; $i < $items; $i++ )


{
RenameFile( $arr, $newText, "RENAME_RO" );
}


EDIT
If I select multiple files it only runs on the first file... is this the recurse bug or is my recurse instruction bad... thought I had that one OK  :-\ ???

100
Script / Re: Title Case
« on: July 06, 2018, 18:31:42 »
Thanks very much Mathias.  ;D  8)
I didn't realize I could use this array form in MS -
Code: [Select]
@var $exceptionsArray[] = { "a", "an", "and", "any", "at", "from", "into", "of", "on", "or", "the", "to", };
The function you have provided is very helpful in making me see the break-down of events & how MS can be used to run different tasks.  I will have to study/learn your style. 

Also I think I may have under-estimated MS & that that combined with my inexperience with ('modern') programming, causes trouble.
I have been looking at Java & C++ so I recognize these structures of code - just not well enough...! 
Better go & read those books I bought I guess ;)

OT Is it possible to create a StrRegExpReplace function for MS?  Or better to combine functions that are already there? 
I liked the idea of using StrRegExpFind to enumerate $<instance> & StrRegExpReplace to step through & replace each $<instance>.  Maybe that couldn't work in practice tho?

Pages: 1 2 3 [4] 5 6 7 8 ... 21