NiftyLink addon - Links using internal associations and more

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

Unfortunately increasing the delay to 150 ms didn't help. How about allowing users to tweak this setting? A new optional ini file section like so:

[delay]
*=50
hostname1=150
hostname2=250
;etc.

Match hostname and set delay= matched value, if found; otherwise set delay= * value, if found; otherwise set delay=internal hardwired value.

Then I could set the optimal setting for all my systems. Thanks
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

Hi sgp,

I did hope the issue could be fixed in a simpler way ...
But I can't even reproduce the problem here, so it's hard for me to fix it. Maybe you can help me, trying to better understand what's going on? For instance, does the problem only occur when the link target is on an USB drive, to which access is rather slow?

I did now as you suggested. In the new version 0.90, there can be an optional section in the INI file, called [DelayBeforePathChange]. The initial entry is

Code: Select all

* = 150
and as before, 150 ms also is the built-in delay in this context, which is used when there is no such section in the INI file, when that section is empty, or when no entry matches.

On the left side of the equal sign there can be any target name or pattern (case-insensitive), where
  • * matches any zero or more characters,
  • ? matches any single character.
Please note that the first match of a pattern with the name of the current target will apply. So * means "anything else", and hence an entry such as

Code: Select all

* = 300
always should be the last entry in the list.

I hope this problem is solved now.

Best regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

I set * = 1500 and could see what's going on here. I see the pull-down directory history menu (the control that also provides breadcrumbs) visible for 1500 ms with the target directory selected (so the target dir is in my history). Then the pull-down menu is retracted and the target directory is left highlighted in the input field. Shouldn't (another) ENTER be pressed at this stage?

I set MyHostName = 1500 as the first entry. FlexLink didn't wait for 1500 ms but for 150 ms (default). I tried *myhostname* and *MyHostName* to no avail.
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

sgp wrote:Shouldn't (another) ENTER be pressed at this stage?
Yes, there should be a simulated ENTER keypress at this stage. And that's what's actually happening on all systems on which I tested the program. I did assume that the ENTER gets lost on your system because the delay before it was too short. My problem is, that I can't reproduce the issue that you are reporting. On what windows version(s) are you encountering this issue?
sgp wrote:I set MyHostName = 1500 as the first entry. FlexLink didn't wait for 1500 ms but for 150 ms (default). I tried *myhostname* and *MyHostName* to no avail.
Maybe I misunderstood your previous suggestion, and this function doesn't work the way you expect it to do. It does work like so:
E.g. in another post, you mentioned a FlexLink with the target

Code: Select all

<newtab> e:\ARC\pc\
If it reads in the INI file say

Code: Select all

[DelayBeforePathChange]
e* = 1500
or

Code: Select all

[DelayBeforePathChange]
*ARC* = 1500
then after double-clicking at the respective FlexLink, there will be a delay of 1500 ms before sending the simulated ENTER keypress to Total Commander's path bar.

//Edit:
In the next version of FlexLink, there will be the option to change the directory by sending the respective path+ENTER to TC's commandline.

Regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

Hello Juergen,

This issue occurs on two different PCs running Windows XP Pro SP3 English.
I even zeroed my wincmd.ini to eliminate possible conflicts, but it didn't help.
What PCs/Windows do you test on?
Have you tried sending keys through different APIs? I can't program Windows, but by using different GUI scripting tools I've learned that Windows provides several methods to simulate key presses, and sometimes different PCs need different methods to perform the same function correctly.

I suggested to match the hostname, not the path. I was thinking that a slow GUI depends primarily on the host (old/new HW, RAM amount, etc.) Maybe matching the path could be useful for slower drives, like network shares or green USB drivers... Well, you could still use a single format to match either hostnames or paths:

New rule: If the left-side .ini entry contains one or more backslashes then match against hostname otherwise match against path.
All other rules remain unchanged. And one can use wildcards for both paths and hostnames.
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

Hello sgp!
sgp wrote:This issue occurs on two different PCs running Windows XP Pro SP3 English.
I even zeroed my wincmd.ini to eliminate possible conflicts, but it didn't help.
What PCs/Windows do you test on?
That's strange ... I successfully tested the program on Windows XP Home and XP Pro both SP3 32 bit in German, and Vista Ultimate 32 bit in German. I have no clue what the reason for the different behaviour of the program could be. :(
sgp wrote:Have you tried sending keys through different APIs? I can't program Windows, but by using different GUI scripting tools I've learned that Windows provides several methods to simulate key presses, and sometimes different PCs need different methods to perform the same function correctly.
I haven't tried it yet, but I'm aware of this point, and this will be one of my next steps. Since changing the directory in TC with FlexLink didn't work for you anymore, my hope was that I could provide a fix rather quickly. Wrapping other APIs will take some time, but since there seems to be no easy solution, I also think that it's necessary to do so now.
sgp wrote:I suggested to match the hostname, not the path. I was thinking that a slow GUI depends primarily on the host (old/new HW, RAM amount, etc.) Maybe matching the path could be useful for slower drives, like network shares or green USB drivers... Well, you could still use a single format to match either hostnames or paths:

New rule: If the left-side .ini entry contains one or more backslashes then match against hostname otherwise match against path.
All other rules remain unchanged. And one can use wildcards for both paths and hostnames.
My fault, I'm sorry. For whatever reason I misunderstood you. However, inceasing the delay at that step didn't help anyway ... I'll get back to this later, if necessary.

Best regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

I just released the new version 0.91.

changed
  • The program now uses a completely different method for changing the directory in Total Commander.
  • The optional section [DelayBeforePathChange] in the INI file has been removed.
  • Improved error handling.
  • Some internal details.
new
  • In absolute links, now volume names can be used optionally instead of drive letters.
sgp, I really hope that this version works for you.


//edit 2011-11-26:
Version 0.91.1:
Although rather unlikely, -e or -execute could be the name of an existing directory or file. So I changed that command-line switch to /e or /execute, respectively.

Regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

YES! It works for me now. I like the ability to link a volume name, nice touch. I tested on Win7 as I don't have a WinXP PC available anymore. Thank you very much, Juergen, for this useful tool.
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

sgp wrote:YES! It works for me now.
Huh ... that really takes a load off my mind!! I'm glad that it works for you now. Thank you very much for all your efforts and good suggestions!!

I've uploaded the new version 0.92.

fixed
  • Creation of relative links was sometimes faulty.
new
  • Additional setup version for integration of the program with the operating system (file associations, context menu) so that it can be used conveniently also without Total Commander.
Best regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

Hi,

I've released FlexLink 1.00, the first non-beta version of the program.

changed
  • This final version has no time limitation.
  • Supplemented the documentation with an explanation about how to show the content of FlexLinks in TC as tooltip (+ some minor changes).
  • New English and German setup programs.
Happy new year!

Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
jp_roth
Junior Member
Junior Member
Posts: 18
Joined: 2011-07-08, 00:43 UTC

Post by *jp_roth »

thank you! One of my most favorite plugins! Happy new year!
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

You are welcome!
I'm glad that the program is useful for you.

Regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

I've released version 1.01.

fixed
  • Some minor issues.
changed
  • Installer slightly improved.
new Regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

I've released version 1.02.

fixed
  • Some minor issues.
changed
  • By using ||, simulated keystrokes now can sometimes be made more robust. The program then waits until a new window is open (max. 60 seconds). The standard INI file has been changed accordingly.
new
  • In the dialog for creating FlexLinks, the help can also be accessed by pressing [F1].
  • Italian translation (thanks to forum member lio).
Regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

Hi Juergen, thank you for this update. I ran into a usage issue. If a flexlink targets a .chm file, when I execute the link in TC I get inside the chm archive - because I have a chm packer plugin installed - while my intent was to just open the help file.
I did find a work-around, see below. However I can see the same sort of situation arising when you want to open an archive for which the system provides no association, so you need to specify an internal association to bypass the plugin search. Everything is summarized below.

Code: Select all

[FlexLink]
; next line opens chm plugin
;Target=..\ahk\AutoHotkey.chm
; next line reports execution error
;Target=<system>..\ahk\AutoHotkey.chm
; next line works to open the help file
Target="%SystemRoot%\hh.exe" ..\ahk\AutoHotkey.chm
; next line is in my wish list; search TC internal associations first
;Target=<commander>..\ahk\AutoHotkey.chm
; next line is in my wish list; open with N-th internal association
;Target=<commander N>..\ahk\AutoHotkey.chm
Post Reply