autoit AHK and what have you

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

User avatar
FrizzleFry
Platinum Member
Platinum Member
Posts: 1143
Joined: 2005 Oct 16, 19:09

Re: autoit AHK and what have you

Post by FrizzleFry » 2018 Feb 09, 18:46

I do like your method since it does not require the two findwnd commands. I used two comparisons because I wanted to be sure that one of the panes was focused instead of the address bar, tree or whatever and If so just pop up a message.

Is there a way to switch focus to the panes without changing which one is active?

Thanks for showing me how to initialize a variable, that was something I was looking for.

from the x2help:

POP - any - Moves the constant or stored variable in the last result $0 register to be used in a subsequent command

I keep reading this as if it is getting the value from $0 but it is actually putting the constant or stored variable into $0.

I think the underlined part should be changed to "into the last result $0 register" or maybe just "into the $0 register. Also is the variable that is poped into $0 initialized or changed as in a stack? It does not seem to, so maybe it should be copies rather than moves.

User avatar
nikos
Site Admin
Site Admin
Posts: 14523
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: autoit AHK and what have you

Post by nikos » 2018 Feb 10, 05:30

POP is a term used in stacks, but the macro language has no stack so the real action is "copy"

as for the focus, your method is safer I suppose because the tree or something else might have the focus, not just left/right panels
Is there a way to switch focus to the panes without changing which one is active?
if you detect that neither left or right are focus, you can sendkey tab or esc, that usually puts the focus back to the last active pane

aml
Member
Member
Posts: 39
Joined: 2012 Sep 18, 08:24

Re: autoit AHK and what have you

Post by aml » 2018 Jun 10, 14:15

Since you've asked: ;-)

I use AHK; the decision was probably another big error of mine since some of the AHK programmers are clearly nuts, it's remained to be some of the most chaotic, most awful "languages" there are, syntax-wise, and for "continuity" reasons - refactoring, anyone, hey? -, it'll continue to remain that way; AI's clearly superior.

That being said, and without any intention to "harm": x2'd been the very last one of the relevant, paid file managers which'd been always devoid of a macro component (even the - otherwise very inferior, see my other rants - SC'd had such a component for many years), so I welcome x2's internal macro functionality tremendously.

Very ironic: in the Eighties, almost any "professional" software of ANY kind had its own macro functionality, whilst since Windows (3.1 even) that came to be explicitely rarified; today it's "standard" for paid file managers at least, and finally, x2 has jumped upon the bandwagon: overdue, but formidable nethertheless!

I've spoken of my problems with updating/syncing (read: synching, but that triggers another "error" here, as does "nethertheless"...) x2's files/folders tags (see my "Columns" thread); within AHK, I can easily write to, and read from, anything-named plain-text ADS (alternate data stream(s)), whilst x2 at least allows for some internal processing of "system", i.e. non-plain-text ADS; at least ONE, x2-proprietary-named such ADS / "column" would be incredibly helpful, since:

Whenever you can use either (well-designed) internal macros or then some external macro/"scripting" language on the system level, i.e. without any interaction with some proprietary software, the reliability AND the speed of what you can do is sped up in quite an incredible way.

Just some days ago, I had to check, and to update for inconsistencies, my x2 "Comment" "column" (i.e. tags indicating my symlink targets of my "original" files) in some 1,500 files folder; before, I had made the mistake to "synch" (see above; cf. supra) to some other, backup hdd with "Beyond Compare" (no harm to "BC", it's quite a wonderful software if you don't make such a terrible mistake as mine here), with then deleting the "superfluous" 0-byte-content files on my "source" hdd... well, those were symlinks, hahaha! (well, it was the middle of the night, so...)

Then, I tried to retrieve my lost symlink files by "Stellar Phoenix" (paid, generally), and which I thought I had got for free, some months ago, in some (of their rather frequent) give-away actions: Well, it told me that my "trial period" was over! Hahahahaha! (Needless to say that I hadn't changed anything (neither the hdd and/or ssd nor the motherboard nor anything else) in the meantime in my pc.)

Thus, from my experience, forget "Stellar Phoenix" (see below; cf. infra), not only it's "free" licenses, since: To develop this, sometime ago, I'd had some (physically) faulty, unreadable USB stick, and there, I had to absolutely retrieve the data in question, so I trialed about 15 or so different retrieval software offerings, free and paid; "of course", "Stellar Phoenix", in spite of its preposterous name, failed miserably (as many others did (It's simple: almost all of these recovery software offerings first show you the possible results - or they are unable to do so -, then you buy, then you recover, and btw, I've been preserving that - otherwise unusable stick since, in order for it to be the almost-perfect object to trial recovery software, today and tomorrow)), whilst (only) "GetDataBack" (and indeed, the famous "Kroll Ontrack Data Recovery (Home)", but which is by yearly subscription...) retrieved everything, so "GetDataBack" (after purchase) saved my files, and I'm very happy to advertise this fine program, considering it was up to a - difficult - task, just like the Kroll offering, but at a fraction of the cost.

But back to my recent problem: My "free license" of "Stellar Phoenix" informing me that my "trial" being overdue, I tried with - the otherwise, stellar - GetDataBack, and frankly speaking, since GDB wasn't able to specify the target folder of my lost symlinks - nobody's perfect as they say, hey? -, it announced me another 10 or more hours of "deep" searching, the target hdd being an external, USB 2.0 one.

After some more 15 minutes, I lost patience, so I wrote a script for just recreating my symlinks, from my respective tags (and checking of course if those additional files were already present or not), and which cost me 45 or 50 minutes (I'm just an enthusiast scripter/macroer, so I'm unable to pretend I did it in 15, 20 minutes which probably would have been the correct time span in AHK)...

But back to x2, finally!

The RUN of that script took more than 15 minutes (for, as said, about 1500 files within the same directory), on a W10 Prof 7700 system with 16gb of working memory...

since it had to cope with opening the dialog (alt-h), retrieving the data, the writing (processed) data back into the dialog, closing the dialog, etc., etc. ... whilst comparable processing of file (system) data, done within AHK alone, i.e. without interaction with software dialogs, (on my system) takes less than 3 or 4 seconds.

Again: More than 15 minutes' running some external macro, i.e. some which interacts with software controls, vs. less than 4 seconds for some "internal" macro, i.e. one which just interacts with the system (incl. even the file system).

And THAT's where a(n) (well-designed) internal macro functionality of some - any - software shines: by avoiding the dialogs (and the necessary wait (in AHK: "sleep") times for the macro remaining reliable), and by this speeding up the macro run time by x 1000 or better.

Thus, the title of this thread should not have been "AI, AHK, or something else, what do you use currently?", but "Please, dear users, remind me of devising my new macro system for x2 the way for it to run the real system way, in just some seconds for large data bodies, instead of many, many minutes for each run, having to cope with dialogs!" - Nikos' recent promise to make available the alt-h dialog without having to cope with that dialog showing that dear Nikos has perfectly understood what it's all about, so WHICH external macro language you currently use with your interaction with (ancient) x2 - very thankfully - becomes irrelevant.

This being said, a SINGLE, whatever-you-like-it-to-be-called (e.g. "ads"), additional, plain-text (i.e. from AHK, AI or whatever-"processable") x2* ADS "column" (i.e. attribute), and just demanding some (!) additional code lines, would make x2 oh so much superior and sensational!

*= meaning: Of all the innumerable, possible ADS user-specific "columns", just a single ONE which also could be displayed within x2 (BUT be processed by AHK, AI, whatever)!

I'm aware of the fact that I've been currently "misusing" the x2 forum in order to relate my experience with third-party software which (the experience that is) should be irrelevant to this x2 forum per se, BUT then, this is info you won't find anywhere in the web (about 90 p.c. of so-called "reviews" there being paid or otherwise worthless at the end of the day), so... and if google's able to redirect prospects / buyers/ users here, by these means, I don't see no harm for anyone: neither for those prospective users, nor for x2 to begin with. ;-)

User avatar
nikos
Site Admin
Site Admin
Posts: 14523
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: autoit AHK and what have you

Post by nikos » 2018 Jun 10, 16:22

now that kilmatead is missing in action, you inherit the title of most verbose forum person ;)

Post Reply