Closed thediveo closed 2 years ago
There are some dependencies between the libraries: you see for example Lib/Teams.ahk includes also other Libraries. To be sure you don't forget anything you could include all the files in the Lib folder. Or you extract=copy&paste the function you need in your script directly. Or you delete the function you don't need in a modified version of the Lib/Teams.ahk (e.g. keep only the Teams_Mute function.)
HTH
I already copied in everything inside the repo's main branch Lib/
folder but that triggered the original problem. When you mention "other Libraries", are you referring to them inside Lib/
or are there other library folders I need to copy over? At first I looked at stripping down but the many dependencies were difficult to check so that I decided to ask for guidance first.
Seems you might have an old version of the code or I have forgotten to push some changes. Can you look for Login_SetPassword in your source files and tell me where it is called?
I've downloaded the git repo main branch as a .zip file via GitHub's Code Download ZIP button, https://github.com/tdalon/ahk/archive/refs/heads/main.zip.
The dependency seems to be indirectly from Lib/Teams.ahk
including Lib/Connections.ahk
, and right near the top of Connections.ahk
there is the CNAuth()
function definition in the .zip version I downloaded as the main repo:
CNAuth() {
sPassword := Login_SetPassword()
If (sPassword="")
return
PowerTools_ConnectionsRootUrl := PowerTools_RegRead("ConnectionsRootUrl")
I already wondered because when looking at your last main branch commit some 4-5h ago you mention to have removed the dependency on SetPassword or something to that extend, if I interpret this correctly.
Thanks for the catch and detailed report. It was a mistake on my side: I have forgotten to push this change. Now I have committed the file. Sorry for the trouble. If you use only the Teams stuff , I would consider extracting only the Teams functions you need. Example the Lib/Teams.ahk shall be almost standalone.
After downloading a new .zip archive of this repo and trying again, Connections.ahk
now crashes due to calls to the non-existant function DownloadToString()
in line 207, 218, and I can see more places where it isn't part of a comment but gets called from code. Unfortunately, Teams_Mute()
has too many indirect dependencies, as can be seen from the exploding number of includes. A tree shaker similar to the Javascript world would be extremely useful here.
I have added the DownloadToString function. And tested your Teams Mute Test on the zip :it shall work now :-)
I have checked a bit the dependencies: these are due to the People Library (that requires the Connections part)
I have pushed an update to the People Lib so that it works without the Connections Lib. (see details here: https://tdalon.blogspot.com/2022/03/ahk-conditional-include.html)
Thanks for reporting.
That now works also on my side. Thank you very much for looking into this issue!
I would like to just use the library part of your ahk package, such as
Teams_Mute()
. I've placed the contents tdalon/ahk/Lib into documents/autohotkey/lib and then tried this simple script with AHK v1:Double-clicking and loading this simple AHK script then fails with Error in #include file, with non-existent function
Login_SetPassword()
. How can I fix this?