how to write the python script to ahk file to avoid dependencies? #259
-
Hello, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hmm. This isn't really a capability that's offered and likely impractical, depending on exactly what your script does. In the older v0 version of the library, AHK commands worked by generating scripts for each function call. At one point, there was a suggestion to add a capability for script generation, which would generate you an AHK script equivalent to the ordered function calls. Though, there's obviously still some large gaps, like if you make use of any flow control statements in Python (like Since v1 version of the library, we no longer rely on script generation. For this and other challenges involved, this probably isn't a feature that will be added anytime in the foreseeable future. However, Python is able to run anywhere AutoHotkey can run. It is possible to bundle your Python script into an executable and use it across machines, if that's what you want to do. There are a few ways to create executables from Python apps, one is PyInstaller. |
Beta Was this translation helpful? Give feedback.
Hmm. This isn't really a capability that's offered and likely impractical, depending on exactly what your script does.
In the older v0 version of the library, AHK commands worked by generating scripts for each function call. At one point, there was a suggestion to add a capability for script generation, which would generate you an AHK script equivalent to the ordered function calls. Though, there's obviously still some large gaps, like if you make use of any flow control statements in Python (like
if
conditions,for
orwhile
loops, etc), that won't appear in the scripts generated. It wouldn't necessarily be portable across machines (or even runs on the same machine) because it would proba…