-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fix: Fixed an issue with drag and dropping items onto .ahk files #14895
Fix: Fixed an issue with drag and dropping items onto .ahk files #14895
Conversation
…d to the path. Removed checks for Python/AHK Installed as AHK does not support version checking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the first time contribution!
Note: AutoHotkey.exe is required to be added to the path, there is currently no check for this.
Does this mean that execution continues still the app doesn't check if python is installed? If so, is that ok?
Yes, the execution will continue. Thank you for clarifying this, just trying out something relatively easy as my first PR, definitely made some mistakes. |
Thanks for the explanation! Don't worry, I will review on my local and approve. |
And I wanna merge this too until the next release. @yaira2 |
{ | ||
var items = await GetDraggedStorageItems(packageView); | ||
if (isTargetPythonFile && !SoftwareHelpers.IsPythonInstalled()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if the target isn't installed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking back, I think my comment was unclear. There is no requirement for AutoHotkey to be in the PATH. The program will still function as intended. This picture is if AutoHotkey is neither installed nor in the PATH.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant, what happens if Python isn't installed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my testing, it treats the file as if you would normally try to open a .py without python installed. If no windows default application for opening the file type is defined, it'll prompt for one like the picture suggests. I'm not sure if I understand or have answered your question correctly, I apologize.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That answers my question, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@lunathanael thank you for contributing to Files! |
Allow .ahk and .py files to be treated as executable files to allow dragging and dropping other files onto them.
This was accomplished by essentially replacing current support for Python to also include AutoHotkey by combining the Script category.
Removed checks for Python/AHK Installed as AHK (and potentially other scripts) does not support version checking. This can be replaced by an alternative method for checking interpreter installation.
Note: AutoHotkey.exe is required to be added to the path, there is currently no check for this.Resolved / Related Issues
Closes Bug: Unable to drag and drop any file onto .ahk files #14430
Validation
How did you test these changes?
Screenshots (optional)