-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with AHK v1 Microsoft Store version #303
Comments
Thanks for the report. AutoHotkey in the Microsoft Store is probably unofficial. So I will not deal with problems arising from it. But I may be able to find the cause of that problem. This extension will run a simple script that simply outputs the AutoHotkey version to the console at the specified My guess is that the dummy AutoHotkey.exe is not passing the messages output by the script to the extension. In this case, you should ask the administrator of the store version of AutoHotkey to improve it. If the problem occurs for other reasons, there is nothing I can do. Last but not least, the easiest solution to this problem is to install AutoHotkey using the installer on the official website. |
Hey, |
It may be that security restrictions prevent access to the debugger port. |
I tried using attach, but the issue persists. I actually think the problem isn't in the attaching, but instead nodeJs fs.existsSync (used here and might be related to this issue. Namely I think that the MSIX hardlink is pointing to a restricted folder and that's why the hardlink size is shown as 0 bytes, so existsSync fails (while the hardlink actually works fine). Using statSync instead might fix it, but I can't test that myself at the moment. Would it be possible for you to try it out by installing the Store version and setting runtime to I hope to get this working because it would simplify AHK usage in restricted corporate environments where only Microsoft Store apps are allowed. VSCode is installable from Store and I have plans on getting both AHK v1 and v2 available there as well. Running scripts through a VSCode extension already works, but getting the debugger working would be a good step forward... EDIT: I got it working by using runtime path |
I am unable to address this issue immediately as I am currently prioritizing the creation of another extension for AutoHotkey. Also, I am avoiding installing unofficial apps due to security issues (As is the case with Chrome's store, etc., it is not completely secure. For this reason, it is better to be especially careful when using it in a company). If you want to address the issue yourself, check out the commit tagged 1.11.0 and replace it with statSync, then run the following command prompt command to create a vsix file, which is the extension package file.
The created vsix file can be installed using the command palette. Press |
Checking for a valid runtime was fixed by replacing the mentioned existsSync call by the following commandOrFileExistsSync:
This requires Replacing existsSyn with commandOrFileExistsSync in |
Thanks for the verification. I personally don't want to be too aggressive in responding to unofficial AutoHotkey.exe. If I decide to improve the verification process for AutoHotkey.exe in the future, I will comment here again. |
Okay, thank you for considering this! This isn't too critical of an issue because the current version also works with the direct path to the exe, simply that it's rather opaque and more complex to use. And support for commands is more of a end-user comfort thing. I didn't address the security concerns of Microsoft Store before, so perhaps a few short comments. |
By command do you mean the exe file in the directives specified in the environment variable? If you specify Thanks for sharing the details about Microsoft store security. |
By command I meant in this case App Execution Alias which are created for MSIX apps, but they work the same as environment variables. This means that when the Store version of AHK is installed, running Support for commands (which includes environment variables I think) could be permitted by using the |
Thanks for letting me know.
It seems that I am using the windows For example,
|
I'm trying to get this extension working with AHK Microsoft Store version, which is a sandboxed variant where the real exe is stored in a protected folder in Program Files, but an user-accessible "dummy" exe is created in
C:\Users\user\AppData\Local\Microsoft\WindowsApps\HaukeGtze.AutoHotkeypoweredbyweatherlights\AutoHotkey.exe
.When I add that path to "runtime" in launch.json, I get an error that "runtime must be a path that exists". AHK scripts run just fine with that exact path, so I figure that the exe being a "dummy" one might be the cause and zero-plusplus is having trouble detecting it because of it?
The text was updated successfully, but these errors were encountered: