Skip to content

Cannot find AHKv2 if only AHKv1 is in path #378

Description

@michaelmesser

describe your issue

I had an end user who I believe had AHKv1 in their path, but did not have v2 in their path. This lead to an error
"AutoHotkey v2 was request but AutoHotkey v1 was detected for executable C:\Program Files\AutoHotkey\Autohotkey.exe"

Explicitly specifying the executable path with r'C:\Program Files\AutoHotkey\v2\AutoHotkey64.exe' worked.
I think this is the relevant line of code is:

or which('AutoHotkey.exe')

ahk.version

1.7.8

AutoHotkey version

v2

Code to reproduce the issue

from ahk import AHK
ahk = AHK(
    version='v2'
)

Traceback/Error message

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions