Page 7 of 8

Re: [AHK] redirecting Windows Explorer to XY

Posted: 20 Sep 2021 22:32
by autocart
You are very welcome. Thank you for your reply! :D
It is a lot of fun. Wish I had more time to work on it. 8)

Re: [AHK] redirecting Windows Explorer to XY

Posted: 29 Mar 2022 23:28
by AlternativeShit
Thanks for this script! It works great and it may very well be the reason why I keep using XYplorer :mrgreen:

However I have a question :

Let's say I, a complete newbie, who knows very little of script and of ahk, would want the script to run at startup.

How would one manage to do that, in really clear, noob friendly instructions ?

Re: [AHK] redirecting Windows Explorer to XY

Posted: 29 Mar 2022 23:35
by autocart
AlternativeShit wrote: 29 Mar 2022 23:28 Thanks for this script! It works great and it may very well be the reason why I keep using XYplorer :mrgreen:
Thank you for the nice feedback.
AlternativeShit wrote: 29 Mar 2022 23:28 Let's say I ... would want the script to run at startup.
How would one manage to do that, in really clear, noob friendly instructions ?
Do you know how to make any "normal" exe file run at startup?

Re: [AHK] redirecting Windows Explorer to XY

Posted: 29 Mar 2022 23:38
by AlternativeShit
autocart wrote: 29 Mar 2022 23:35
AlternativeShit wrote: 29 Mar 2022 23:28 Thanks for this script! It works great and it may very well be the reason why I keep using XYplorer :mrgreen:
Thank you for the nice feedback.
AlternativeShit wrote: 29 Mar 2022 23:28 Let's say I ... would want the script to run at startup.
How would one manage to do that, in really clear, noob friendly instructions ?
Do you know how to make any "normal" exe file run at startup?
Oh it's the same?
Shortcut in Startup folder and done?

Re: [AHK] redirecting Windows Explorer to XY

Posted: 30 Mar 2022 00:02
by autocart
If you have AutoHotkey installed and set to run ahk files as standard action on double click (which is the default), then yes.

Re: [AHK] redirecting Windows Explorer to XY

Posted: 31 Mar 2022 01:12
by AlternativeShit
autocart wrote: 30 Mar 2022 00:02 If you have AutoHotkey installed and set to run ahk files as standard action on double click (which is the default), then yes.
I have AutoHotkey installed, and didn't change any settings.

But it doesn't seem to work ?

Re: [AHK] redirecting Windows Explorer to XY

Posted: 31 Mar 2022 06:55
by autocart
https://windowsloop.com/run-autohotkey- ... -startup/
Or google for "how to autostart autohotkey script".

Re: [AHK] redirecting Windows Explorer to XY

Posted: 31 Mar 2022 10:23
by Horst
I prefer to install Autohotkey and compile the scripts.
The resulting exe can be handled like any other tool.

Re: [AHK] redirecting Windows Explorer to XY

Posted: 31 Mar 2022 16:37
by Norn

Re: [AHK] redirecting Windows Explorer to XY

Posted: 31 Mar 2022 18:18
by Horst
Why should one take that complicated way ?
There is no benefit compared to compiling a script.
You compile it once and run it as a normal tool.

Re: [AHK] redirecting Windows Explorer to XY

Posted: 01 Apr 2022 19:13
by AlternativeShit
autocart wrote: 31 Mar 2022 06:55 https://windowsloop.com/run-autohotkey- ... -startup/
Or google for "how to autostart autohotkey script".
Must have done something wrong, but now it works...
Thanks for the quick reply, and thanks for making this really useful script :biggrin:

Re: [AHK] redirecting Windows Explorer to XY

Posted: 02 Apr 2022 17:13
by Norn
Horst wrote: 31 Mar 2022 18:18
Why should one take that complicated way ?
There is no benefit compared to compiling a script.
You compile it once and run it as a normal tool.
This is the only way I know to open multiple files...

Re: [AHK] redirecting Windows Explorer to XY

Posted: 02 Apr 2022 18:20
by Horst
Norn wrote: 02 Apr 2022 17:13
Horst wrote: 31 Mar 2022 18:18
Why should one take that complicated way ?
There is no benefit compared to compiling a script.
You compile it once and run it as a normal tool.
This is the only way I know to open multiple files...
Whats the diff compared to a batch which starts all the compiled scripts ?
If I always want to run more than one AHK script continuesly I merge it into one.
I can run any number of AHK scripts in a QAP (Quick Access PopUp) group.
Autohotkey is installed of course.

Re: [AHK] redirecting Windows Explorer to XY

Posted: 02 Apr 2022 21:58
by Norn
Thanks for your idea. I'll try it sometime.

Re: [AHK] redirecting Windows Explorer to XY

Posted: 16 Apr 2022 02:47
by WirlyWirly
Since I started using XY, I also have a few AHK scripts I like to run all at once. The approach I've taken is to use a custom toolbar button with a simple script. When I left-click the button it runs 3 scripts that I use with XY.

Here's my code for that button if you'd like to adapt it. Just paste this code into the multi-line edit screen of a custom toolbar button. Respect the indenting, it's important...

Left-Click

Code: Select all

    $AUTOHOTKEY = "<xypath>..\..\AutoHotkeyPortable\AutoHotkeyPortable.exe";
    $SCRIPTS = "<xypath>..\..\_programs_\AutoHotKey\";

    run lax("$AUTOHOTKEY" "$SCRIPTS\Vim-Like\Vim-Like.ahk");
    run lax("$AUTOHOTKEY" "$SCRIPTS\QuickSwitch\QuickSwitch.ahk");
    run lax("$AUTOHOTKEY" "$SCRIPTS\redirectWEwindowsToXY\redirectWEwindowsToXY.ahk");
Since I use AutoHotkeyPortable, I don't have AHK in my path, so I need to specify where the .exe file is in order to run my scripts. That's what the $AUTOHOTKEY variable does. You can omit this if AHK is in your path, which seems to be the case based on your code snippet. The $SCRIPTS variable is the folder that contains my scripts.

Here's the adaption of the command you use to kill the process, you can assign it to right/middle click...

Code: Select all

run lax("taskkill" "/f" "/im" "AutoHotkey.exe");
Also, @autocart, thanks a bunch for this script! I've been using it for months with no issues. If I had to make a suggestion it would be to standardize the .ahk filename going forward. Having the version number in the docstring is standard, regular changes to the filename break scripts such as this little toolbar script. Not a big deal and an easy fix for the end user, but just thought I'd mention it.

Keeping a .log file for the version info and other stuff might be useful too. With syntax highlighting it's easy to tell where comments end, but for people who don't use such an editor big blocks of comments can make it difficult to navigate.

My 2cents anyways, thanks again!